Hands-on Exercise 11

Hands-On Exercise
R
sf
GWmodel
SpatialML

Spatial Interaction Models

Author
Published

March 22, 2024

Modified

March 31, 2024

Calibrating Spatial Interaction Models with R

1.0 What is Spatial Interaction Modelling?

Spatial interaction modelling (or gravity models) is one of the most widely used analytical tools in  studying interactions between social and economic agents observed in geographical space (Patuelli & Arbia, 2016). Spatial Interaction Models (SIMs) are mathematical models for estimating flows between spatial entities developed by Alan Wilson in the late 1960s and early 1970, with considerable uptake and refinement for transport modelling since then Boyce and Williams (2015). Spatial interaction models, in general terms, describe and explain flow or movement between places, based on (1) their spatial separation; (2) their complementarity; and (3) other intervening opportunities or spatial structural elements serve to augment or diminish the expected flow (O’Kelly, 2009).

There are four main types of traditional SIMs (Wilson 1971):

  • Unconstrained

  • Production-constrained

  • Attraction-constrained

  • Doubly-constrained

Ordinary least square (OLS), log-normal, Poisson and negative binomial (NB) regression methods have been used extensively to calibrate OD flow models by processing flow data as different types of dependent variables. In this execrise, we will explore how to calibrate SIM by using the four regression methods in R environment.

2.0 Importing Packages

Firstly, we will install and import necessary R-packages for this modelling exercise. The R packages needed for this exercise are as follows:

  • tmap which provides functions for plotting cartographic quality static point patterns maps or interactive maps by using leaflet API.

  • sf for importing, managing and processing vector-based geospatial data in R.

  • sp for handling spatial objects

  • performance for model comparison and calculating evaluation metrics

  • reshape2 for reshaping dataframes between ‘wide’ format with repeated measurements in separate columns of the same record and ‘long’ format with the repeated measurements in separate records.

  • ggpubr for creating publication-ready plots

  • tidyversefor wrangling attribute data in R

  • stplanr provides functions for solving common problems in transport planning and modelling such as downloading and cleaning transport datasets; creating geographic “desire lines” from origin-destination (OD) data; route assignment, locally and interfaces to routing services such as CycleStreets.net; calculation of route segment attributes such as bearing and aggregate flow; and ‘travel watershed’ analysis.

  • DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML pages, and DataTables provides filtering, pagination, sorting, and many other features in the tables.

pacman::p_load(tmap, sf, sp,
               performance, reshape2,
               ggpubr,  DT, stplanr, tidyverse)

3.0 Importing Datasets to R Environment

In this exercise, the following datasets will be used:

  • Passenger Volume by Origin Destination Bus Stops data set downloaded from LTA DataMall

  • BusStop: This data provides the location of bus stop as at last quarter of 2022.

  • MPSZ-2019: This data provides the sub-zone boundary of URA Master Plan 2019.

odbus <- read_csv("../data/aspatial/origin_destination_bus_202210.csv")
Rows: 5122925 Columns: 7
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): YEAR_MONTH, DAY_TYPE, PT_TYPE
dbl (4): TIME_PER_HOUR, ORIGIN_PT_CODE, DESTINATION_PT_CODE, TOTAL_TRIPS

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
busstop <- st_read(dsn = "../data/geospatial",
                   layer = "BusStop") %>%
  st_transform(crs = 3414)
Reading layer `BusStop' from data source 
  `/Users/khantminnaing/IS415-GAA/data/geospatial' using driver `ESRI Shapefile'
Simple feature collection with 5159 features and 3 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: 3970.122 ymin: 26482.1 xmax: 48284.56 ymax: 52983.82
Projected CRS: SVY21
mpsz <- st_read(dsn = "../data/geospatial",
                   layer = "MPSZ-2019") %>%
  st_transform(crs = 3414)
Reading layer `MPSZ-2019' from data source 
  `/Users/khantminnaing/IS415-GAA/data/geospatial' using driver `ESRI Shapefile'
Simple feature collection with 332 features and 6 fields
Geometry type: MULTIPOLYGON
Dimension:     XY
Bounding box:  xmin: 103.6057 ymin: 1.158699 xmax: 104.0885 ymax: 1.470775
Geodetic CRS:  WGS 84

4.0 Data Preparation & Wrangling

4.1 Aspatial Data Wrangling

Let’s have a look at the newly created odbus tibble data frame by using glimpse() function.

glimpse(odbus)
Rows: 5,122,925
Columns: 7
$ YEAR_MONTH          <chr> "2022-10", "2022-10", "2022-10", "2022-10", "2022-…
$ DAY_TYPE            <chr> "WEEKDAY", "WEEKENDS/HOLIDAY", "WEEKENDS/HOLIDAY",…
$ TIME_PER_HOUR       <dbl> 10, 10, 7, 11, 16, 16, 20, 7, 7, 11, 11, 8, 11, 11…
$ PT_TYPE             <chr> "BUS", "BUS", "BUS", "BUS", "BUS", "BUS", "BUS", "…
$ ORIGIN_PT_CODE      <dbl> 65239, 65239, 23519, 52509, 54349, 54349, 43371, 8…
$ DESTINATION_PT_CODE <dbl> 65159, 65159, 23311, 42041, 53241, 53241, 14139, 9…
$ TOTAL_TRIPS         <dbl> 2, 1, 2, 1, 1, 4, 1, 3, 1, 5, 2, 5, 15, 40, 1, 1, …

A quick check of odbus tibble data frame shows that the values in OROGIN_PT_CODE and DESTINATON_PT_CODE are in numeric data type. Hence, the code chunk below is used to convert these data values into character data type.

odbus$ORIGIN_PT_CODE <- as.factor(odbus$ORIGIN_PT_CODE)
odbus$DESTINATION_PT_CODE <- as.factor(odbus$DESTINATION_PT_CODE) 

Next, for the purpose of this exercise, we will extract commuting flows on weekday and between 6 and 9 o’clock.

odbus6_9 <- odbus %>%
  filter(DAY_TYPE == "WEEKDAY") %>%
  filter(TIME_PER_HOUR >= 6 &
           TIME_PER_HOUR <= 9) %>%
  group_by(ORIGIN_PT_CODE,
           DESTINATION_PT_CODE) %>%
  summarise(TRIPS = sum(TOTAL_TRIPS))
`summarise()` has grouped output by 'ORIGIN_PT_CODE'. You can override using
the `.groups` argument.

Let’s check the content of newly created odbus6_9 using datatable() function.

datatable(odbus6_9)
Warning in instance$preRenderHook(instance): It seems your data is too big for
client-side DataTables. You may consider server-side processing:
https://rstudio.github.io/DT/server.html

We will save the output in rds format for future used.

write_rds(odbus6_9, "../data/rds/odbus6_9.rds")

4.2 Geospatial Data Wrangling

4.2.2 Combining Bus Stop and MPSZ

Code chunk below populates the planning subzone code (i.e. SUBZONE_C) of mpsz sf data frame into busstop sf data frame.

busstop_mpsz <- st_intersection(busstop, mpsz) %>%
  select(BUS_STOP_N, SUBZONE_C) %>%
  st_drop_geometry()
Warning: attribute variables are assumed to be spatially constant throughout
all geometries
datatable(busstop_mpsz)

We will save the output into rds format.

write_rds(busstop_mpsz, "../data/rds/busstop_mpsz.rds")  

Next, we will append the planning subzone code from busstop_mpsz data frame onto odbus6_9 data frame.

od_data <- left_join(odbus6_9 , busstop_mpsz,
            by = c("ORIGIN_PT_CODE" = "BUS_STOP_N")) %>%
  rename(ORIGIN_BS = ORIGIN_PT_CODE,
         ORIGIN_SZ = SUBZONE_C,
         DESTIN_BS = DESTINATION_PT_CODE)
Warning in left_join(odbus6_9, busstop_mpsz, by = c(ORIGIN_PT_CODE = "BUS_STOP_N")): Detected an unexpected many-to-many relationship between `x` and `y`.
ℹ Row 55491 of `x` matches multiple rows in `y`.
ℹ Row 161 of `y` matches multiple rows in `x`.
ℹ If a many-to-many relationship is expected, set `relationship =
  "many-to-many"` to silence this warning.

Before continue, it is a good practice for us to check for duplicating records.

duplicate <- od_data %>%
  group_by_all() %>%
  filter(n()>1) %>%
  ungroup()

duplicate
# A tibble: 976 × 4
   ORIGIN_BS DESTIN_BS TRIPS ORIGIN_SZ
   <chr>     <fct>     <dbl> <chr>    
 1 22501     22009         3 JWSZ09   
 2 22501     22009         3 JWSZ09   
 3 22501     22451        85 JWSZ09   
 4 22501     22451        85 JWSZ09   
 5 22501     22469        18 JWSZ09   
 6 22501     22469        18 JWSZ09   
 7 22501     22479        29 JWSZ09   
 8 22501     22479        29 JWSZ09   
 9 22501     22509         3 JWSZ09   
10 22501     22509         3 JWSZ09   
# ℹ 966 more rows

Since we have found duplicated records as seen in the table above, we will use the code chunk below to retain the unique records only.

od_data <- unique(od_data)

It is a good practice to confirm if the duplicating records issue has been addressed fully.

duplicate <- od_data %>%
  group_by_all() %>%
  filter(n()>1) %>%
  ungroup()

duplicate
# A tibble: 0 × 4
# ℹ 4 variables: ORIGIN_BS <chr>, DESTIN_BS <fct>, TRIPS <dbl>, ORIGIN_SZ <chr>

Now there is no more duplicated data. We can continue with updating the od_data data frame with planning subzone codes.

od_data <- left_join(od_data , busstop_mpsz,
            by = c("DESTIN_BS" = "BUS_STOP_N")) 
Warning in left_join(od_data, busstop_mpsz, by = c(DESTIN_BS = "BUS_STOP_N")): Detected an unexpected many-to-many relationship between `x` and `y`.
ℹ Row 74 of `x` matches multiple rows in `y`.
ℹ Row 1379 of `y` matches multiple rows in `x`.
ℹ If a many-to-many relationship is expected, set `relationship =
  "many-to-many"` to silence this warning.

Once again, let’s check the duplicates

duplicate <- od_data %>%
  group_by_all() %>%
  filter(n()>1) %>%
  ungroup()
duplicate
# A tibble: 1,256 × 5
   ORIGIN_BS DESTIN_BS TRIPS ORIGIN_SZ SUBZONE_C
   <chr>     <chr>     <dbl> <chr>     <chr>    
 1 1012      82221         1 <NA>      GLSZ05   
 2 1012      82221         1 <NA>      GLSZ05   
 3 1112      51071        49 <NA>      CCSZ01   
 4 1112      51071        49 <NA>      CCSZ01   
 5 1112      53041         4 <NA>      BSSZ01   
 6 1112      53041         4 <NA>      BSSZ01   
 7 1112      82221         1 <NA>      GLSZ05   
 8 1112      82221         1 <NA>      GLSZ05   
 9 1113      51071         2 <NA>      CCSZ01   
10 1113      51071         2 <NA>      CCSZ01   
# ℹ 1,246 more rows

Duplicate issue still exists that needs to be addressed.

od_data <- unique(od_data)
od_data <- od_data %>%
  rename(DESTIN_SZ = SUBZONE_C) %>%
  drop_na() %>%
  group_by(ORIGIN_SZ, DESTIN_SZ) %>%
  summarise(MORNING_PEAK = sum(TRIPS))
`summarise()` has grouped output by 'ORIGIN_SZ'. You can override using the
`.groups` argument.

Now that we have prepared the data and addressed the issues, we can now save the output into rds file format.

write_rds(od_data, "../data/rds/od_data_fii.rds")

5.0 Visualising Spatial Interaction

In this section, we will explore how to prepare a desire line by using stplanr package. In an Origin-Destination (O-D) study, desire lines are used to determine the travel pattern of an area or city. They represent the number of people going from one origin to another destination.

5.1 Removing intra-zonal flows

Desire lines plot between one origin and one destination. It means it cannot represent intra-zonal flows where origin and destination belong to the same spatial unit (in our case, same subzone or planning area). Hence, we will first need to remove intra-zonal flows from our data.

od_data_fij <- od_data[od_data$ORIGIN_SZ!=od_data$DESTIN_SZ,]

Next, we will save the output in a rds file format.

write_rds(od_data_fij, "../data/rds/od_data_fij.rds")

5.2 Creating Desire Lines

To create desire lines, we will make use of od2line() function from stplanr package. This package takes in the origin and destination of a flow and transform it into a linestring.

flowLine <- od2line(flow = od_data_fij, 
                    zones = mpsz,
                    zone_code = "SUBZONE_C")
Creating centroids representing desire line start and end points.

The comment suggests that centroids are used to represent the start and end points.

Let’s save the output into the rds file format.

write_rds(flowLine, "../data/rds/flowLine.rds")

5.3 Visualising the Desire Lines

tm_shape(mpsz) +
  tm_polygons() +
flowLine %>%  
tm_shape() +
  tm_lines(lwd = "MORNING_PEAK",
           style = "quantile",
           scale = c(0.1, 1, 3, 5, 7, 10),
           n = 6)

6.0 Computing Distance Matrix

In spatial interaction, a distance matrix is a table that shows the distance between pairs of locations. For example, in the table below we can see an Euclidean distance of 3926.0025 between MESZ01 and RVSZ05, of 3939.1079 between MESZ01 and SRSZ01, and so on. By definition, an location’s distance from itself, which is shown in the main diagonal of the table, is 0. In this section, we will conduct additional data preparation necessary to compute distance matrix to run spatial interaction modelling.

6.1 Converting from sf data.table to SpatialPolygonsDataFrame

There are at least two ways to compute the required distance matrix. One is based on sf and the other is based on sp. Past experience shown that computing distance matrix by using sf function took relatively longer time that sp method especially the data set is large. In view of this, sp method is used in the code chunks below.

First as.Spatial() will be used to convert mpsz from sf tibble data frame to SpatialPolygonsDataFrame of sp object as shown in the code chunk below.

mpsz_sp <- as(mpsz, "Spatial")
mpsz_sp
class       : SpatialPolygonsDataFrame 
features    : 332 
extent      : 2667.538, 56396.44, 15748.72, 50256.33  (xmin, xmax, ymin, ymax)
crs         : +proj=tmerc +lat_0=1.36666666666667 +lon_0=103.833333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
variables   : 6
names       : SUBZONE_N, SUBZONE_C, PLN_AREA_N, PLN_AREA_C,       REGION_N, REGION_C 
min values  : ADMIRALTY,    AMSZ01, ANG MO KIO,         AM, CENTRAL REGION,       CR 
max values  :    YUNNAN,    YSSZ09,     YISHUN,         YS,    WEST REGION,       WR 

6.2 Computing Distance Matrix

Next, spDists() of sp package will be used to compute the Euclidean distance between the centroids of the planning subzones.

dist <- spDists(mpsz_sp, 
                longlat = FALSE)
head(dist, n=c(10, 10))
           [,1]       [,2]      [,3]      [,4]       [,5]      [,6]      [,7]
 [1,]     0.000  3926.0025  3939.108 20252.964  2989.9839  1431.330 19211.836
 [2,]  3926.003     0.0000   305.737 16513.865   951.8314  5254.066 16242.523
 [3,]  3939.108   305.7370     0.000 16412.062  1045.9088  5299.849 16026.146
 [4,] 20252.964 16513.8648 16412.062     0.000 17450.3044 21665.795  7229.017
 [5,]  2989.984   951.8314  1045.909 17450.304     0.0000  4303.232 17020.916
 [6,]  1431.330  5254.0664  5299.849 21665.795  4303.2323     0.000 20617.082
 [7,] 19211.836 16242.5230 16026.146  7229.017 17020.9161 20617.082     0.000
 [8,] 14960.942 12749.4101 12477.871 11284.279 13336.0421 16281.453  5606.082
 [9,]  7515.256  7934.8082  7649.776 18427.503  7801.6163  8403.896 14810.930
[10,]  6391.342  4975.0021  4669.295 15469.566  5226.8731  7707.091 13111.391
           [,8]      [,9]     [,10]
 [1,] 14960.942  7515.256  6391.342
 [2,] 12749.410  7934.808  4975.002
 [3,] 12477.871  7649.776  4669.295
 [4,] 11284.279 18427.503 15469.566
 [5,] 13336.042  7801.616  5226.873
 [6,] 16281.453  8403.896  7707.091
 [7,]  5606.082 14810.930 13111.391
 [8,]     0.000  9472.024  8575.490
 [9,]  9472.024     0.000  3780.800
[10,]  8575.490  3780.800     0.000

Notice that the output dist is a matrix object class of R. Also notice that the column heanders and row headers are not labeled with the planning subzone codes. We need to carry out additional data preparation steps to tidy this data up.

6.3 Labelling Column and Row Headers of Distance Matrix

First, we will create a list sorted according to the the distance matrix by planning sub-zone code.

sz_names <- mpsz$SUBZONE_C

Next we will attach SUBZONE_C to row and column for distance matrix matching ahead

colnames(dist) <- paste0(sz_names)
rownames(dist) <- paste0(sz_names)

6.4 Pivoting Distance Value by SUBZONE_C

Next, we will pivot the distance matrix into a long table by using the row and column subzone codes as show in the code chunk below.

distPair <- melt(dist) %>%
  rename(dist = value)
head(distPair, 10)
     Var1   Var2      dist
1  MESZ01 MESZ01     0.000
2  RVSZ05 MESZ01  3926.003
3  SRSZ01 MESZ01  3939.108
4  WISZ01 MESZ01 20252.964
5  MUSZ02 MESZ01  2989.984
6  MPSZ05 MESZ01  1431.330
7  WISZ03 MESZ01 19211.836
8  WISZ02 MESZ01 14960.942
9  SISZ02 MESZ01  7515.256
10 SISZ01 MESZ01  6391.342

Notice that the within zone distance is 0.

6.5 Updating Intra-zonal Distances

In this section, we are going to append a constant value to replace the intra-zonal distance of 0. First, we will select and find out the minimum value of the distance by using summary().

distPair %>%
  filter(dist > 0) %>%
  summary()
      Var1             Var2             dist        
 MESZ01 :   331   MESZ01 :   331   Min.   :  173.8  
 RVSZ05 :   331   RVSZ05 :   331   1st Qu.: 7149.5  
 SRSZ01 :   331   SRSZ01 :   331   Median :11890.0  
 WISZ01 :   331   WISZ01 :   331   Mean   :12229.4  
 MUSZ02 :   331   MUSZ02 :   331   3rd Qu.:16401.7  
 MPSZ05 :   331   MPSZ05 :   331   Max.   :49894.4  
 (Other):107906   (Other):107906                    

Next, a constant distance value of 50m is added into intra-zones distance.

distPair$dist <- ifelse(distPair$dist == 0,
                        50, distPair$dist)
distPair %>%
  summary()
      Var1             Var2             dist      
 MESZ01 :   332   MESZ01 :   332   Min.   :   50  
 RVSZ05 :   332   RVSZ05 :   332   1st Qu.: 7097  
 SRSZ01 :   332   SRSZ01 :   332   Median :11864  
 WISZ01 :   332   WISZ01 :   332   Mean   :12193  
 MUSZ02 :   332   MUSZ02 :   332   3rd Qu.:16388  
 MPSZ05 :   332   MPSZ05 :   332   Max.   :49894  
 (Other):108232   (Other):108232                  

The code chunk below is used to rename the origin and destination fields.

distPair <- distPair %>%
  rename(orig = Var1,
         dest = Var2)

Lastly, the code chunk below is used to save the dataframe into rds file format

write_rds(distPair, "../data/rds/distPair.rds") 

7.0 Preparing the Flow Data

Firstly, we will compute the total passenger trip between and within planning subzones by using the code chunk below. The output is called flow_data.

flow_data <- od_data_fij %>%
  group_by(ORIGIN_SZ, DESTIN_SZ) %>% 
  summarize(TRIPS = sum(MORNING_PEAK)) 
`summarise()` has grouped output by 'ORIGIN_SZ'. You can override using the
`.groups` argument.

Let’s look at some of the data rows.

head(flow_data, 10)
# A tibble: 10 × 3
# Groups:   ORIGIN_SZ [1]
   ORIGIN_SZ DESTIN_SZ TRIPS
   <chr>     <chr>     <dbl>
 1 AMSZ01    AMSZ02     8289
 2 AMSZ01    AMSZ03     8971
 3 AMSZ01    AMSZ04     2252
 4 AMSZ01    AMSZ05     6136
 5 AMSZ01    AMSZ06     2148
 6 AMSZ01    AMSZ07     1620
 7 AMSZ01    AMSZ08     1925
 8 AMSZ01    AMSZ09     1773
 9 AMSZ01    AMSZ10       63
10 AMSZ01    AMSZ11      542

7.1 Separating intra-flow from passenger volume df

Code chunk below is used to add two new fields in flow_data dataframe namely FlowNoIntra and offset.

flow_data$FlowNoIntra <- ifelse(
  flow_data$ORIGIN_SZ == flow_data$DESTIN_SZ, 
  0, flow_data$TRIPS)
flow_data$offset <- ifelse(
  flow_data$ORIGIN_SZ == flow_data$DESTIN_SZ, 
  0.000001, 1)

7.2 Combining passenger volume data with distance value

Before we can join flow_data and distPair, we need to convert data value type of ORIGIN_SZ and DESTIN_SZ fields of flow_data dataframe into factor data type.

flow_data$ORIGIN_SZ <- as.factor(flow_data$ORIGIN_SZ)
flow_data$DESTIN_SZ <- as.factor(flow_data$DESTIN_SZ)

Now, left_join() of dplyr will be used to flow_data dataframe and distPair dataframe. The output is called flow_data1.

flow_data1 <- flow_data %>%
  left_join (distPair,
             by = c("ORIGIN_SZ" = "orig",
                    "DESTIN_SZ" = "dest"))

8.0 Preparing Origin and Destination Attributes

8.1 Importing population data

Firstly, we will import the population data.

pop <- read_csv("../data/aspatial/pop.csv")
Rows: 332 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): PA, SZ
dbl (3): AGE7_12, AGE13_24, AGE25_64

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Next, we will do a left_join to pop data frame with mpsz. The output will be a sf object where each polygon in mpsz will be assigned a population value.

pop <- pop %>%
  left_join(mpsz,
            by = c("PA" = "PLN_AREA_N",
                   "SZ" = "SUBZONE_N")) %>%
  select(1:6) %>%
  rename(SZ_NAME = SZ,
         SZ = SUBZONE_C)

Next, we will need to do another left_join() with flow_data1 that we have prepared earlier to prepare both origin and destination attributes.

flow_data1 <- flow_data1 %>%
  left_join(pop,
            by = c(ORIGIN_SZ = "SZ")) %>%
  rename(ORIGIN_AGE7_12 = AGE7_12,
         ORIGIN_AGE13_24 = AGE13_24,
         ORIGIN_AGE25_64 = AGE25_64) %>%
  select(-c(PA, SZ_NAME))
flow_data1 <- flow_data1 %>%
  left_join(pop,
            by = c(DESTIN_SZ = "SZ")) %>%
  rename(DESTIN_AGE7_12 = AGE7_12,
         DESTIN_AGE13_24 = AGE13_24,
         DESTIN_AGE25_64 = AGE25_64) %>%
  select(-c(PA, SZ_NAME))

We will called the output data file SIM_data. it is in rds data file format.

write_rds(flow_data1, "../data/rds/flow_data_6-9.rds")
SIM_data <- read_rds("../data/rds/flow_data_6-9.rds")

9.0 Calibrating Spatial Interaction Models

In this section, we explore how to calibrate Spatial Interaction Models by using Poisson Regression method.

9.1 Visualising the Dependent Variables

Firstly, let us plot the distribution of the dependent variable (i.e. TRIPS) by using histogram method by using the code chunk below.

ggplot(data = SIM_data,
       aes(x = TRIPS)) +
  geom_histogram()
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Notice that the distribution is highly skewed and not resemble bell shape or also known as normal distribution.

Next, let us visualise the relation between the dependent variable and one of the key independent variable in Spatial Interaction Model, namely distance.

ggplot(data = SIM_data,
       aes(x = dist,
           y = TRIPS)) +
  geom_point() +
  geom_smooth(method = lm)
`geom_smooth()` using formula = 'y ~ x'

Notice that their relationship hardly resemble linear relationship.

On the other hand, if we plot the scatter plot by using the log transformed version of both variables, we can see that their relationship is more resemble linear relationship.

ggplot(data = SIM_data,
       aes(x = log(dist),
           y = log(TRIPS))) +
  geom_point() +
  geom_smooth(method = lm)
`geom_smooth()` using formula = 'y ~ x'

9.2 Log Transformation

Since Poisson Regression is based of log and log 0 is undefined, it is important for us to ensure that no 0 values in the explanatory variables.

In the code chunk below, summary() of Base R is used to compute the summary statistics of all variables in SIM_data data frame.

summary(SIM_data)
  ORIGIN_SZ          DESTIN_SZ             TRIPS           FlowNoIntra      
 Length:14471       Length:14471       Min.   :     1.0   Min.   :     1.0  
 Class :character   Class :character   1st Qu.:    14.0   1st Qu.:    14.0  
 Mode  :character   Mode  :character   Median :    73.0   Median :    73.0  
                                       Mean   :   855.1   Mean   :   855.1  
                                       3rd Qu.:   393.0   3rd Qu.:   393.0  
                                       Max.   :148274.0   Max.   :148274.0  
     offset       dist         ORIGIN_AGE7_12 ORIGIN_AGE13_24 ORIGIN_AGE25_64
 Min.   :1   Min.   :  173.8   Min.   :   0   Min.   :    0   Min.   :    0  
 1st Qu.:1   1st Qu.: 3498.5   1st Qu.: 240   1st Qu.:  460   1st Qu.: 2210  
 Median :1   Median : 6181.8   Median : 700   Median : 1350   Median : 7030  
 Mean   :1   Mean   : 7004.2   Mean   :1034   Mean   : 2274   Mean   :10516  
 3rd Qu.:1   3rd Qu.: 9796.4   3rd Qu.:1500   3rd Qu.: 3260   3rd Qu.:15770  
 Max.   :1   Max.   :26135.8   Max.   :6340   Max.   :16380   Max.   :74610  
 DESTIN_AGE7_12 DESTIN_AGE13_24 DESTIN_AGE25_64
 Min.   :   0   Min.   :    0   Min.   :    0  
 1st Qu.: 250   1st Qu.:  460   1st Qu.: 2210  
 Median : 720   Median : 1430   Median : 7030  
 Mean   :1036   Mean   : 2296   Mean   :10605  
 3rd Qu.:1500   3rd Qu.: 3260   3rd Qu.:15830  
 Max.   :6340   Max.   :16380   Max.   :74610  

The print report above reveals that variables ORIGIN_AGE7_12, ORIGIN_AGE13_24, ORIGIN_AGE25_64,DESTIN_AGE7_12, DESTIN_AGE13_24, DESTIN_AGE25_64 consist of 0 values.

In view of this, code chunk below will be used to replace zero values to 0.99.

SIM_data$DESTIN_AGE7_12 <- ifelse(
  SIM_data$DESTIN_AGE7_12 == 0,
  0.99, SIM_data$DESTIN_AGE7_12)
SIM_data$DESTIN_AGE13_24 <- ifelse(
  SIM_data$DESTIN_AGE13_24 == 0,
  0.99, SIM_data$DESTIN_AGE13_24)
SIM_data$DESTIN_AGE25_64 <- ifelse(
  SIM_data$DESTIN_AGE25_64 == 0,
  0.99, SIM_data$DESTIN_AGE25_64)
SIM_data$ORIGIN_AGE7_12 <- ifelse(
  SIM_data$ORIGIN_AGE7_12 == 0,
  0.99, SIM_data$ORIGIN_AGE7_12)
SIM_data$ORIGIN_AGE13_24 <- ifelse(
  SIM_data$ORIGIN_AGE13_24 == 0,
  0.99, SIM_data$ORIGIN_AGE13_24)
SIM_data$ORIGIN_AGE25_64 <- ifelse(
  SIM_data$ORIGIN_AGE25_64 == 0,
  0.99, SIM_data$ORIGIN_AGE25_64)

Let’s summarise the new data

summary(SIM_data)
  ORIGIN_SZ          DESTIN_SZ             TRIPS           FlowNoIntra      
 Length:14471       Length:14471       Min.   :     1.0   Min.   :     1.0  
 Class :character   Class :character   1st Qu.:    14.0   1st Qu.:    14.0  
 Mode  :character   Mode  :character   Median :    73.0   Median :    73.0  
                                       Mean   :   855.1   Mean   :   855.1  
                                       3rd Qu.:   393.0   3rd Qu.:   393.0  
                                       Max.   :148274.0   Max.   :148274.0  
     offset       dist         ORIGIN_AGE7_12    ORIGIN_AGE13_24   
 Min.   :1   Min.   :  173.8   Min.   :   0.99   Min.   :    0.99  
 1st Qu.:1   1st Qu.: 3498.5   1st Qu.: 240.00   1st Qu.:  460.00  
 Median :1   Median : 6181.8   Median : 700.00   Median : 1350.00  
 Mean   :1   Mean   : 7004.2   Mean   :1034.15   Mean   : 2274.15  
 3rd Qu.:1   3rd Qu.: 9796.4   3rd Qu.:1500.00   3rd Qu.: 3260.00  
 Max.   :1   Max.   :26135.8   Max.   :6340.00   Max.   :16380.00  
 ORIGIN_AGE25_64    DESTIN_AGE7_12    DESTIN_AGE13_24    DESTIN_AGE25_64   
 Min.   :    0.99   Min.   :   0.99   Min.   :    0.99   Min.   :    0.99  
 1st Qu.: 2210.00   1st Qu.: 250.00   1st Qu.:  460.00   1st Qu.: 2210.00  
 Median : 7030.00   Median : 720.00   Median : 1430.00   Median : 7030.00  
 Mean   :10516.44   Mean   :1035.72   Mean   : 2296.06   Mean   :10604.87  
 3rd Qu.:15770.00   3rd Qu.:1500.00   3rd Qu.: 3260.00   3rd Qu.:15830.00  
 Max.   :74610.00   Max.   :6340.00   Max.   :16380.00   Max.   :74610.00  

Notice that all the 0 values have been replaced by 0.99.

9.3 Unconstrained Spatial Interaction Model

In this section, we will calibrate an unconstrained spatial interaction model by using glm() function. The explanatory variables are origin population by different age cohort, destination population by different age cohort (i.e. ORIGIN_AGE25_64) and distance between origin and destination in km (i.e. dist).

uncSIM <- glm(formula = TRIPS ~ 
                log(ORIGIN_AGE25_64) + 
                log(DESTIN_AGE25_64) +
                log(dist),
              family = poisson(link = "log"),
              data = SIM_data,
              na.action = na.exclude)
uncSIM

Call:  glm(formula = TRIPS ~ log(ORIGIN_AGE25_64) + log(DESTIN_AGE25_64) + 
    log(dist), family = poisson(link = "log"), data = SIM_data, 
    na.action = na.exclude)

Coefficients:
         (Intercept)  log(ORIGIN_AGE25_64)  log(DESTIN_AGE25_64)  
            16.99076               0.22371               0.01103  
           log(dist)  
            -1.49596  

Degrees of Freedom: 14470 Total (i.e. Null);  14467 Residual
Null Deviance:      47090000 
Residual Deviance: 26270000     AIC: 26360000

9.3.1 R-squared function

In order to measure how much variation of the trips can be accounted by the model we will write a function to calculate R-Squared value as shown below.

CalcRSquared <- function(observed,estimated){
  r <- cor(observed,estimated)
  R2 <- r^2
  R2
}

Next, we will compute the R-squared of the unconstrained SIM by using the code chunk below.

CalcRSquared(uncSIM$data$TRIPS, uncSIM$fitted.values)
[1] 0.1674135
r2_mcfadden(uncSIM)
# R2 for Generalized Linear Regression
       R2: 0.441
  adj. R2: 0.441

9.4 Origin Constrained Spatial Interaction Model

In this section, we will calibrate an origin constrained SIM. For origin constrained SIM, only explanatory variables representing the attractiveness at the destinations will be used. This is because such models emphasize the limitations or capacities of the origins rather than the demand or attractiveness of the destinations. The capacity or limitation at the origin sites determines the potential for generating interactions or flows.

orcSIM <- glm(formula = TRIPS ~ 
                 ORIGIN_SZ +
                 log(DESTIN_AGE25_64) +
                 log(dist),
              family = poisson(link = "log"),
              data = SIM_data,
              na.action = na.exclude)
summary(orcSIM)

Call:
glm(formula = TRIPS ~ ORIGIN_SZ + log(DESTIN_AGE25_64) + log(dist), 
    family = poisson(link = "log"), data = SIM_data, na.action = na.exclude)

Coefficients:
                       Estimate Std. Error   z value Pr(>|z|)    
(Intercept)           1.987e+01  4.770e-03  4166.411  < 2e-16 ***
ORIGIN_SZAMSZ02       7.160e-01  4.683e-03   152.904  < 2e-16 ***
ORIGIN_SZAMSZ03       3.862e-01  4.873e-03    79.258  < 2e-16 ***
ORIGIN_SZAMSZ04      -6.846e-02  5.306e-03   -12.904  < 2e-16 ***
ORIGIN_SZAMSZ05      -2.426e-01  5.954e-03   -40.750  < 2e-16 ***
ORIGIN_SZAMSZ06       1.022e-01  5.307e-03    19.257  < 2e-16 ***
ORIGIN_SZAMSZ07      -1.119e+00  9.793e-03  -114.308  < 2e-16 ***
ORIGIN_SZAMSZ08      -6.525e-01  9.213e-03   -70.829  < 2e-16 ***
ORIGIN_SZAMSZ09       1.377e-01  5.629e-03    24.456  < 2e-16 ***
ORIGIN_SZAMSZ10       4.212e-01  4.907e-03    85.834  < 2e-16 ***
ORIGIN_SZAMSZ11      -1.352e+00  1.302e-02  -103.836  < 2e-16 ***
ORIGIN_SZAMSZ12      -1.456e+00  1.111e-02  -131.089  < 2e-16 ***
ORIGIN_SZBDSZ01       1.371e+00  4.574e-03   299.666  < 2e-16 ***
ORIGIN_SZBDSZ02       9.665e-01  5.291e-03   182.663  < 2e-16 ***
ORIGIN_SZBDSZ03       1.183e+00  4.799e-03   246.605  < 2e-16 ***
ORIGIN_SZBDSZ04       2.020e+00  4.123e-03   489.880  < 2e-16 ***
ORIGIN_SZBDSZ05       1.048e+00  4.820e-03   217.428  < 2e-16 ***
ORIGIN_SZBDSZ06       1.277e+00  4.876e-03   261.937  < 2e-16 ***
ORIGIN_SZBDSZ07      -5.256e-01  9.903e-03   -53.079  < 2e-16 ***
ORIGIN_SZBDSZ08      -3.868e-01  9.240e-03   -41.859  < 2e-16 ***
ORIGIN_SZBKSZ01      -3.459e-01  6.703e-03   -51.602  < 2e-16 ***
ORIGIN_SZBKSZ02       2.298e-01  5.352e-03    42.938  < 2e-16 ***
ORIGIN_SZBKSZ03       5.502e-01  5.091e-03   108.081  < 2e-16 ***
ORIGIN_SZBKSZ04      -3.136e-01  6.273e-03   -49.987  < 2e-16 ***
ORIGIN_SZBKSZ05      -2.838e-01  6.547e-03   -43.341  < 2e-16 ***
ORIGIN_SZBKSZ06      -1.650e-01  5.971e-03   -27.628  < 2e-16 ***
ORIGIN_SZBKSZ07       5.456e-01  4.609e-03   118.381  < 2e-16 ***
ORIGIN_SZBKSZ08       4.522e-03  5.411e-03     0.836 0.403270    
ORIGIN_SZBKSZ09      -7.805e-02  5.859e-03   -13.320  < 2e-16 ***
ORIGIN_SZBLSZ01      -1.646e+00  1.505e-02  -109.411  < 2e-16 ***
ORIGIN_SZBLSZ02      -1.969e+00  1.935e-02  -101.754  < 2e-16 ***
ORIGIN_SZBLSZ03      -2.831e+00  4.620e-02   -61.282  < 2e-16 ***
ORIGIN_SZBLSZ04      -1.523e+00  2.341e-02   -65.061  < 2e-16 ***
ORIGIN_SZBMSZ01       9.162e-02  5.508e-03    16.632  < 2e-16 ***
ORIGIN_SZBMSZ02      -1.383e+00  6.964e-03  -198.608  < 2e-16 ***
ORIGIN_SZBMSZ03      -6.753e-01  5.844e-03  -115.568  < 2e-16 ***
ORIGIN_SZBMSZ04      -5.975e-01  5.381e-03  -111.050  < 2e-16 ***
ORIGIN_SZBMSZ05      -3.117e+00  1.701e-02  -183.286  < 2e-16 ***
ORIGIN_SZBMSZ06      -3.113e+00  1.832e-02  -169.918  < 2e-16 ***
ORIGIN_SZBMSZ07      -7.169e-01  5.949e-03  -120.520  < 2e-16 ***
ORIGIN_SZBMSZ08      -8.906e-01  5.955e-03  -149.544  < 2e-16 ***
ORIGIN_SZBMSZ09      -1.352e+00  8.846e-03  -152.846  < 2e-16 ***
ORIGIN_SZBMSZ10      -1.709e+00  9.149e-03  -186.753  < 2e-16 ***
ORIGIN_SZBMSZ11      -1.147e+00  6.679e-03  -171.690  < 2e-16 ***
ORIGIN_SZBMSZ12      -1.293e+00  9.529e-03  -135.725  < 2e-16 ***
ORIGIN_SZBMSZ13      -3.687e-01  6.084e-03   -60.610  < 2e-16 ***
ORIGIN_SZBMSZ14      -9.309e-01  6.713e-03  -138.680  < 2e-16 ***
ORIGIN_SZBMSZ15      -6.446e-01  6.180e-03  -104.296  < 2e-16 ***
ORIGIN_SZBMSZ16      -1.542e+00  9.459e-03  -163.043  < 2e-16 ***
ORIGIN_SZBMSZ17      -1.631e+00  1.585e-02  -102.955  < 2e-16 ***
ORIGIN_SZBPSZ01       1.983e-01  5.708e-03    34.735  < 2e-16 ***
ORIGIN_SZBPSZ02      -3.032e-01  6.537e-03   -46.383  < 2e-16 ***
ORIGIN_SZBPSZ03      -9.632e-02  6.370e-03   -15.122  < 2e-16 ***
ORIGIN_SZBPSZ04       4.968e-01  5.162e-03    96.237  < 2e-16 ***
ORIGIN_SZBPSZ05       5.887e-01  4.711e-03   124.972  < 2e-16 ***
ORIGIN_SZBPSZ06      -1.115e+00  9.511e-03  -117.231  < 2e-16 ***
ORIGIN_SZBPSZ07      -4.329e-01  8.907e-03   -48.600  < 2e-16 ***
ORIGIN_SZBSSZ01       1.363e-01  5.843e-03    23.321  < 2e-16 ***
ORIGIN_SZBSSZ02       4.209e-01  4.992e-03    84.319  < 2e-16 ***
ORIGIN_SZBSSZ03      -2.505e-01  5.546e-03   -45.163  < 2e-16 ***
ORIGIN_SZBTSZ01       1.444e-01  6.019e-03    23.987  < 2e-16 ***
ORIGIN_SZBTSZ02      -5.337e-01  8.237e-03   -64.793  < 2e-16 ***
ORIGIN_SZBTSZ03      -3.786e-01  7.043e-03   -53.754  < 2e-16 ***
ORIGIN_SZBTSZ04      -1.150e+00  1.060e-02  -108.559  < 2e-16 ***
ORIGIN_SZBTSZ05      -1.082e+00  1.212e-02   -89.274  < 2e-16 ***
ORIGIN_SZBTSZ06      -1.207e+00  9.603e-03  -125.683  < 2e-16 ***
ORIGIN_SZBTSZ07      -2.344e+00  1.427e-02  -164.290  < 2e-16 ***
ORIGIN_SZBTSZ08      -1.217e+00  1.108e-02  -109.767  < 2e-16 ***
ORIGIN_SZCBSZ01      -1.242e+00  5.484e-02   -22.641  < 2e-16 ***
ORIGIN_SZCCSZ01      -9.023e-01  1.398e-02   -64.556  < 2e-16 ***
ORIGIN_SZCHSZ01      -3.764e-02  1.214e-02    -3.101 0.001930 ** 
ORIGIN_SZCHSZ02      -5.426e-01  8.413e-03   -64.502  < 2e-16 ***
ORIGIN_SZCHSZ03       1.559e+00  6.373e-03   244.612  < 2e-16 ***
ORIGIN_SZCKSZ01       1.528e-01  5.263e-03    29.027  < 2e-16 ***
ORIGIN_SZCKSZ02       5.729e-01  5.369e-03   106.695  < 2e-16 ***
ORIGIN_SZCKSZ03       8.313e-01  4.611e-03   180.288  < 2e-16 ***
ORIGIN_SZCKSZ04       1.391e+00  4.646e-03   299.420  < 2e-16 ***
ORIGIN_SZCKSZ05       1.041e+00  5.393e-03   193.068  < 2e-16 ***
ORIGIN_SZCKSZ06       4.753e-01  7.466e-03    63.662  < 2e-16 ***
ORIGIN_SZCLSZ01      -5.802e-01  7.870e-03   -73.729  < 2e-16 ***
ORIGIN_SZCLSZ02      -1.391e+00  1.367e-02  -101.764  < 2e-16 ***
ORIGIN_SZCLSZ03      -8.248e-01  8.215e-03  -100.401  < 2e-16 ***
ORIGIN_SZCLSZ04       8.458e-01  4.578e-03   184.750  < 2e-16 ***
ORIGIN_SZCLSZ05      -1.649e+00  1.479e-02  -111.489  < 2e-16 ***
ORIGIN_SZCLSZ06       9.161e-01  4.326e-03   211.773  < 2e-16 ***
ORIGIN_SZCLSZ07      -2.174e-01  5.721e-03   -38.000  < 2e-16 ***
ORIGIN_SZCLSZ08       2.070e-01  6.075e-03    34.071  < 2e-16 ***
ORIGIN_SZCLSZ09      -1.315e+00  1.664e-02   -79.040  < 2e-16 ***
ORIGIN_SZDTSZ02      -3.907e+00  8.341e-02   -46.836  < 2e-16 ***
ORIGIN_SZDTSZ03      -3.835e+00  7.381e-02   -51.956  < 2e-16 ***
ORIGIN_SZDTSZ13      -2.992e+00  3.129e-02   -95.616  < 2e-16 ***
ORIGIN_SZGLSZ01      -1.534e+00  9.789e-03  -156.679  < 2e-16 ***
ORIGIN_SZGLSZ02       2.602e-01  5.212e-03    49.927  < 2e-16 ***
ORIGIN_SZGLSZ03       1.702e-01  5.532e-03    30.770  < 2e-16 ***
ORIGIN_SZGLSZ04       9.888e-01  4.400e-03   224.722  < 2e-16 ***
ORIGIN_SZGLSZ05       9.517e-01  4.563e-03   208.583  < 2e-16 ***
ORIGIN_SZHGSZ01       3.117e-01  4.845e-03    64.344  < 2e-16 ***
ORIGIN_SZHGSZ02       4.265e-01  4.835e-03    88.207  < 2e-16 ***
ORIGIN_SZHGSZ03       2.887e-01  5.223e-03    55.280  < 2e-16 ***
ORIGIN_SZHGSZ04       9.189e-01  4.405e-03   208.584  < 2e-16 ***
ORIGIN_SZHGSZ05       1.235e+00  4.373e-03   282.399  < 2e-16 ***
ORIGIN_SZHGSZ06      -3.746e-02  5.677e-03    -6.599 4.14e-11 ***
ORIGIN_SZHGSZ07       4.609e-01  4.905e-03    93.968  < 2e-16 ***
ORIGIN_SZHGSZ08       1.873e-01  5.527e-03    33.884  < 2e-16 ***
ORIGIN_SZHGSZ09      -1.540e+00  7.439e-03  -207.013  < 2e-16 ***
ORIGIN_SZHGSZ10      -2.856e+00  4.215e-02   -67.754  < 2e-16 ***
ORIGIN_SZJESZ01       4.099e-01  5.008e-03    81.855  < 2e-16 ***
ORIGIN_SZJESZ02       1.795e-01  5.012e-03    35.821  < 2e-16 ***
ORIGIN_SZJESZ03       8.032e-02  5.370e-03    14.959  < 2e-16 ***
ORIGIN_SZJESZ04      -1.277e+00  1.010e-02  -126.444  < 2e-16 ***
ORIGIN_SZJESZ05      -2.062e+00  1.402e-02  -147.089  < 2e-16 ***
ORIGIN_SZJESZ06       1.755e-01  4.915e-03    35.714  < 2e-16 ***
ORIGIN_SZJESZ07      -1.760e+00  1.186e-02  -148.470  < 2e-16 ***
ORIGIN_SZJESZ08      -8.114e-01  1.179e-02   -68.825  < 2e-16 ***
ORIGIN_SZJESZ09       7.798e-01  5.143e-03   151.637  < 2e-16 ***
ORIGIN_SZJESZ10      -1.041e+00  1.919e-02   -54.228  < 2e-16 ***
ORIGIN_SZJESZ11      -1.419e+00  1.979e-02   -71.707  < 2e-16 ***
ORIGIN_SZJWSZ01       7.403e-01  6.541e-03   113.180  < 2e-16 ***
ORIGIN_SZJWSZ02       1.128e+00  4.591e-03   245.628  < 2e-16 ***
ORIGIN_SZJWSZ03       1.429e+00  4.310e-03   331.602  < 2e-16 ***
ORIGIN_SZJWSZ04       6.889e-01  5.010e-03   137.491  < 2e-16 ***
ORIGIN_SZJWSZ05      -1.550e+00  1.305e-02  -118.788  < 2e-16 ***
ORIGIN_SZJWSZ06      -8.296e-01  1.092e-02   -75.948  < 2e-16 ***
ORIGIN_SZJWSZ07      -2.042e+00  2.778e-02   -73.524  < 2e-16 ***
ORIGIN_SZJWSZ08       2.140e+00  4.214e-03   507.972  < 2e-16 ***
ORIGIN_SZJWSZ09       1.930e+00  4.034e-03   478.362  < 2e-16 ***
ORIGIN_SZKLSZ01       2.575e-01  5.092e-03    50.559  < 2e-16 ***
ORIGIN_SZKLSZ02      -5.904e-01  6.537e-03   -90.322  < 2e-16 ***
ORIGIN_SZKLSZ03      -4.084e-01  6.035e-03   -67.671  < 2e-16 ***
ORIGIN_SZKLSZ04      -2.101e+00  1.211e-02  -173.485  < 2e-16 ***
ORIGIN_SZKLSZ05      -1.106e+00  1.090e-02  -101.528  < 2e-16 ***
ORIGIN_SZKLSZ06      -5.823e+00  1.857e-01   -31.351  < 2e-16 ***
ORIGIN_SZKLSZ07      -1.196e+00  8.722e-03  -137.181  < 2e-16 ***
ORIGIN_SZKLSZ08      -1.722e+00  1.032e-02  -166.835  < 2e-16 ***
ORIGIN_SZLKSZ01      -1.693e+00  3.973e-02   -42.622  < 2e-16 ***
ORIGIN_SZMDSZ01      -1.157e+00  2.857e-02   -40.501  < 2e-16 ***
ORIGIN_SZMDSZ02      -5.123e-01  1.041e-02   -49.210  < 2e-16 ***
ORIGIN_SZMDSZ03      -1.830e+00  1.708e-02  -107.172  < 2e-16 ***
ORIGIN_SZMPSZ01      -5.757e-01  8.534e-03   -67.467  < 2e-16 ***
ORIGIN_SZMPSZ02      -3.293e-01  7.063e-03   -46.619  < 2e-16 ***
ORIGIN_SZMPSZ03       3.265e-01  5.681e-03    57.476  < 2e-16 ***
ORIGIN_SZMUSZ02      -3.947e+00  1.038e-01   -38.037  < 2e-16 ***
ORIGIN_SZNTSZ01      -2.968e+00  3.530e-02   -84.090  < 2e-16 ***
ORIGIN_SZNTSZ02      -3.275e+00  2.341e-02  -139.897  < 2e-16 ***
ORIGIN_SZNTSZ03      -1.036e+00  7.849e-03  -132.034  < 2e-16 ***
ORIGIN_SZNTSZ05      -4.093e+00  4.964e-02   -82.444  < 2e-16 ***
ORIGIN_SZNTSZ06      -4.680e+00  5.575e-02   -83.940  < 2e-16 ***
ORIGIN_SZNVSZ01       3.575e-01  4.688e-03    76.256  < 2e-16 ***
ORIGIN_SZNVSZ02      -6.214e-01  6.783e-03   -91.610  < 2e-16 ***
ORIGIN_SZNVSZ03      -1.035e+00  8.206e-03  -126.139  < 2e-16 ***
ORIGIN_SZNVSZ04      -9.358e-01  9.203e-03  -101.678  < 2e-16 ***
ORIGIN_SZNVSZ05      -2.238e+00  1.687e-02  -132.722  < 2e-16 ***
ORIGIN_SZPGSZ01      -3.636e-01  1.247e-02   -29.163  < 2e-16 ***
ORIGIN_SZPGSZ02      -3.679e-01  7.514e-03   -48.962  < 2e-16 ***
ORIGIN_SZPGSZ03       7.791e-01  4.869e-03   160.021  < 2e-16 ***
ORIGIN_SZPGSZ04       1.293e+00  4.503e-03   287.129  < 2e-16 ***
ORIGIN_SZPGSZ05       5.066e-01  6.010e-03    84.293  < 2e-16 ***
ORIGIN_SZPLSZ01      -5.817e-01  1.211e-02   -48.032  < 2e-16 ***
ORIGIN_SZPLSZ02      -9.541e-01  1.505e-02   -63.402  < 2e-16 ***
ORIGIN_SZPLSZ03      -1.450e+00  3.721e-02   -38.975  < 2e-16 ***
ORIGIN_SZPLSZ04      -2.423e+00  3.706e-02   -65.386  < 2e-16 ***
ORIGIN_SZPLSZ05      -1.659e+00  2.255e-02   -73.571  < 2e-16 ***
ORIGIN_SZPNSZ01       1.580e+00  4.854e-03   325.551  < 2e-16 ***
ORIGIN_SZPNSZ02       7.624e-01  1.130e-02    67.445  < 2e-16 ***
ORIGIN_SZPNSZ03      -1.375e+00  1.947e-02   -70.626  < 2e-16 ***
ORIGIN_SZPNSZ04      -2.083e+00  3.355e-02   -62.086  < 2e-16 ***
ORIGIN_SZPNSZ05      -8.463e-01  2.762e-02   -30.646  < 2e-16 ***
ORIGIN_SZPRSZ01       1.463e-01  1.185e-02    12.352  < 2e-16 ***
ORIGIN_SZPRSZ02       1.347e+00  4.740e-03   284.231  < 2e-16 ***
ORIGIN_SZPRSZ03       1.011e+00  4.830e-03   209.371  < 2e-16 ***
ORIGIN_SZPRSZ04       2.947e-02  7.676e-03     3.839 0.000124 ***
ORIGIN_SZPRSZ05       1.742e+00  4.487e-03   388.273  < 2e-16 ***
ORIGIN_SZPRSZ06      -8.494e-01  1.188e-02   -71.475  < 2e-16 ***
ORIGIN_SZPRSZ07      -2.217e+00  1.639e-02  -135.246  < 2e-16 ***
ORIGIN_SZPRSZ08       4.627e-01  6.450e-03    71.735  < 2e-16 ***
ORIGIN_SZQTSZ01      -2.925e-01  6.903e-03   -42.382  < 2e-16 ***
ORIGIN_SZQTSZ02      -8.224e-01  6.403e-03  -128.443  < 2e-16 ***
ORIGIN_SZQTSZ03      -2.742e-01  5.909e-03   -46.402  < 2e-16 ***
ORIGIN_SZQTSZ04      -1.230e+00  7.550e-03  -162.859  < 2e-16 ***
ORIGIN_SZQTSZ05      -7.428e-01  6.531e-03  -113.729  < 2e-16 ***
ORIGIN_SZQTSZ06      -6.829e-01  6.841e-03   -99.834  < 2e-16 ***
ORIGIN_SZQTSZ07      -1.435e+00  9.703e-03  -147.867  < 2e-16 ***
ORIGIN_SZQTSZ08      -3.395e-01  6.377e-03   -53.234  < 2e-16 ***
ORIGIN_SZQTSZ09      -6.863e-01  7.209e-03   -95.191  < 2e-16 ***
ORIGIN_SZQTSZ10      -2.947e-01  6.705e-03   -43.952  < 2e-16 ***
ORIGIN_SZQTSZ11      -2.151e+00  1.448e-02  -148.558  < 2e-16 ***
ORIGIN_SZQTSZ12      -2.691e+00  1.877e-02  -143.350  < 2e-16 ***
ORIGIN_SZQTSZ13      -4.465e-01  8.051e-03   -55.453  < 2e-16 ***
ORIGIN_SZQTSZ14      -1.766e+00  1.233e-02  -143.207  < 2e-16 ***
ORIGIN_SZQTSZ15      -4.312e-01  1.219e-02   -35.371  < 2e-16 ***
ORIGIN_SZRCSZ01      -1.707e+00  1.267e-02  -134.759  < 2e-16 ***
ORIGIN_SZRCSZ06      -1.110e+00  8.501e-03  -130.546  < 2e-16 ***
ORIGIN_SZRVSZ01      -3.154e+00  3.243e-02   -97.280  < 2e-16 ***
ORIGIN_SZRVSZ02      -3.703e+00  2.777e-02  -133.358  < 2e-16 ***
ORIGIN_SZRVSZ03      -3.344e+00  2.458e-02  -136.004  < 2e-16 ***
ORIGIN_SZRVSZ04      -3.834e+00  5.567e-02   -68.861  < 2e-16 ***
ORIGIN_SZRVSZ05      -2.997e+00  1.659e-02  -180.629  < 2e-16 ***
ORIGIN_SZSBSZ01       2.289e-01  6.549e-03    34.953  < 2e-16 ***
ORIGIN_SZSBSZ02      -5.709e-01  8.312e-03   -68.686  < 2e-16 ***
ORIGIN_SZSBSZ03       9.116e-01  4.865e-03   187.396  < 2e-16 ***
ORIGIN_SZSBSZ04       9.183e-01  5.425e-03   169.277  < 2e-16 ***
ORIGIN_SZSBSZ05      -9.130e-02  6.826e-03   -13.376  < 2e-16 ***
ORIGIN_SZSBSZ06      -1.102e+00  1.721e-02   -64.058  < 2e-16 ***
ORIGIN_SZSBSZ07      -5.964e-01  1.257e-02   -47.452  < 2e-16 ***
ORIGIN_SZSBSZ08      -9.096e-01  1.417e-02   -64.174  < 2e-16 ***
ORIGIN_SZSBSZ09      -5.758e-01  9.060e-03   -63.555  < 2e-16 ***
ORIGIN_SZSESZ02       1.160e+00  4.514e-03   257.101  < 2e-16 ***
ORIGIN_SZSESZ03       1.181e+00  4.330e-03   272.797  < 2e-16 ***
ORIGIN_SZSESZ04       8.270e-01  4.993e-03   165.617  < 2e-16 ***
ORIGIN_SZSESZ05      -2.483e-01  6.156e-03   -40.341  < 2e-16 ***
ORIGIN_SZSESZ06       9.372e-01  4.839e-03   193.664  < 2e-16 ***
ORIGIN_SZSESZ07      -2.188e+00  1.964e-02  -111.405  < 2e-16 ***
ORIGIN_SZSGSZ01      -7.081e-01  8.721e-03   -81.192  < 2e-16 ***
ORIGIN_SZSGSZ02      -1.219e+00  1.036e-02  -117.649  < 2e-16 ***
ORIGIN_SZSGSZ03       2.171e-01  5.343e-03    40.642  < 2e-16 ***
ORIGIN_SZSGSZ04       4.028e-01  4.975e-03    80.963  < 2e-16 ***
ORIGIN_SZSGSZ05      -1.783e+00  1.092e-02  -163.343  < 2e-16 ***
ORIGIN_SZSGSZ06       4.372e-01  4.746e-03    92.137  < 2e-16 ***
ORIGIN_SZSGSZ07      -7.170e-01  6.553e-03  -109.412  < 2e-16 ***
ORIGIN_SZSKSZ01       2.661e-01  8.687e-03    30.626  < 2e-16 ***
ORIGIN_SZSKSZ02       1.199e+00  5.746e-03   208.588  < 2e-16 ***
ORIGIN_SZSKSZ03      -1.987e-01  8.192e-03   -24.250  < 2e-16 ***
ORIGIN_SZSKSZ04      -1.504e+00  2.763e-02   -54.441  < 2e-16 ***
ORIGIN_SZSKSZ05      -3.753e-01  1.567e-02   -23.952  < 2e-16 ***
ORIGIN_SZSLSZ01      -2.742e+00  3.297e-02   -83.175  < 2e-16 ***
ORIGIN_SZSLSZ04      -2.091e-01  7.811e-03   -26.764  < 2e-16 ***
ORIGIN_SZSRSZ01      -3.036e+00  1.639e-02  -185.276  < 2e-16 ***
ORIGIN_SZTHSZ01      -1.907e+00  4.887e-02   -39.016  < 2e-16 ***
ORIGIN_SZTHSZ03      -1.557e+00  2.244e-02   -69.378  < 2e-16 ***
ORIGIN_SZTHSZ04      -2.634e+00  2.869e-02   -91.787  < 2e-16 ***
ORIGIN_SZTHSZ06      -2.191e+00  1.843e-02  -118.909  < 2e-16 ***
ORIGIN_SZTMSZ01       8.189e-01  5.898e-03   138.855  < 2e-16 ***
ORIGIN_SZTMSZ02       2.363e+00  3.994e-03   591.654  < 2e-16 ***
ORIGIN_SZTMSZ03       1.735e+00  4.307e-03   402.809  < 2e-16 ***
ORIGIN_SZTMSZ04       1.234e+00  5.203e-03   237.220  < 2e-16 ***
ORIGIN_SZTMSZ05      -1.883e-01  1.134e-02   -16.604  < 2e-16 ***
ORIGIN_SZTNSZ01      -2.117e+00  1.294e-02  -163.649  < 2e-16 ***
ORIGIN_SZTNSZ02      -1.953e+00  1.003e-02  -194.676  < 2e-16 ***
ORIGIN_SZTNSZ03      -2.254e+00  1.359e-02  -165.813  < 2e-16 ***
ORIGIN_SZTNSZ04      -6.098e-01  7.548e-03   -80.780  < 2e-16 ***
ORIGIN_SZTPSZ01      -6.947e-01  6.803e-03  -102.119  < 2e-16 ***
ORIGIN_SZTPSZ02       4.354e-01  4.493e-03    96.891  < 2e-16 ***
ORIGIN_SZTPSZ03      -6.871e-01  6.263e-03  -109.710  < 2e-16 ***
ORIGIN_SZTPSZ04      -6.567e-01  5.864e-03  -111.999  < 2e-16 ***
ORIGIN_SZTPSZ05      -5.131e-01  6.238e-03   -82.259  < 2e-16 ***
ORIGIN_SZTPSZ06      -3.195e-01  6.013e-03   -53.129  < 2e-16 ***
ORIGIN_SZTPSZ07      -2.755e-01  6.343e-03   -43.434  < 2e-16 ***
ORIGIN_SZTPSZ08      -1.070e+00  9.744e-03  -109.859  < 2e-16 ***
ORIGIN_SZTPSZ09      -7.583e-01  6.957e-03  -109.002  < 2e-16 ***
ORIGIN_SZTPSZ10      -9.569e-01  7.877e-03  -121.475  < 2e-16 ***
ORIGIN_SZTPSZ11      -2.123e-02  5.717e-03    -3.712 0.000205 ***
ORIGIN_SZTPSZ12      -5.596e-01  6.808e-03   -82.204  < 2e-16 ***
ORIGIN_SZTSSZ01      -1.858e+00  4.792e-02   -38.760  < 2e-16 ***
ORIGIN_SZTSSZ02       1.171e+00  8.351e-03   140.236  < 2e-16 ***
ORIGIN_SZTSSZ03       6.235e-01  8.679e-03    71.837  < 2e-16 ***
ORIGIN_SZTSSZ04       9.407e-01  9.091e-03   103.483  < 2e-16 ***
ORIGIN_SZTSSZ05       1.540e-01  1.524e-02    10.110  < 2e-16 ***
ORIGIN_SZTSSZ06       1.783e+00  1.785e-02    99.894  < 2e-16 ***
ORIGIN_SZWCSZ01       9.661e-01  8.719e-03   110.801  < 2e-16 ***
ORIGIN_SZWCSZ02      -2.128e+00  3.294e-02   -64.614  < 2e-16 ***
ORIGIN_SZWCSZ03      -4.931e+00  1.241e-01   -39.741  < 2e-16 ***
ORIGIN_SZWDSZ01       1.509e+00  4.212e-03   358.263  < 2e-16 ***
ORIGIN_SZWDSZ02       1.096e+00  4.875e-03   224.831  < 2e-16 ***
ORIGIN_SZWDSZ03       1.704e+00  4.566e-03   373.068  < 2e-16 ***
ORIGIN_SZWDSZ04       1.525e+00  5.198e-03   293.289  < 2e-16 ***
ORIGIN_SZWDSZ05       7.276e-01  5.460e-03   133.265  < 2e-16 ***
ORIGIN_SZWDSZ06       9.234e-01  5.288e-03   174.612  < 2e-16 ***
ORIGIN_SZWDSZ07      -6.865e-01  8.560e-03   -80.197  < 2e-16 ***
ORIGIN_SZWDSZ08      -4.019e-01  8.280e-03   -48.532  < 2e-16 ***
ORIGIN_SZWDSZ09       1.648e+00  4.506e-03   365.819  < 2e-16 ***
ORIGIN_SZYSSZ01      -1.148e-01  6.039e-03   -19.006  < 2e-16 ***
ORIGIN_SZYSSZ02       9.402e-01  5.182e-03   181.426  < 2e-16 ***
ORIGIN_SZYSSZ03       1.972e+00  4.401e-03   447.939  < 2e-16 ***
ORIGIN_SZYSSZ04       1.125e+00  4.685e-03   240.242  < 2e-16 ***
ORIGIN_SZYSSZ05       4.050e-01  6.025e-03    67.223  < 2e-16 ***
ORIGIN_SZYSSZ06      -5.788e-01  1.177e-02   -49.178  < 2e-16 ***
ORIGIN_SZYSSZ07      -1.087e+00  1.424e-02   -76.304  < 2e-16 ***
ORIGIN_SZYSSZ08       1.656e-01  6.370e-03    25.992  < 2e-16 ***
ORIGIN_SZYSSZ09       1.137e+00  4.468e-03   254.460  < 2e-16 ***
log(DESTIN_AGE25_64)  2.913e-02  9.125e-05   319.210  < 2e-16 ***
log(dist)            -1.665e+00  4.007e-04 -4154.754  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 47094011  on 14470  degrees of freedom
Residual deviance: 16943744  on 14190  degrees of freedom
AIC: 17033444

Number of Fisher Scoring iterations: 6

Let’s check the R-square values of origin constrained SIM model this time.

CalcRSquared(orcSIM$data$TRIPS, orcSIM$fitted.values)
[1] 0.3990462

Notably, R-squared improves from the unconstrained SIM model.

9.5 Destination Constrained Spatial Interaction Model

In this section, we will calibrate an destination constrained SIM. For destination constrained SIM, only explanatory variables which represent how propulsive the origins are will be used. This is because such models emphasize the demand or attractiveness of the destinations rather than the limitations or capacities of the origins. The demand or attractiveness of the destination sites determines the potential for generating interactions or flows.

decSIM <- glm(formula = TRIPS ~ 
                DESTIN_SZ + 
                log(ORIGIN_AGE25_64) + 
                log(dist),
              family = poisson(link = "log"),
              data = SIM_data,
              na.action = na.exclude)
summary(decSIM)

Call:
glm(formula = TRIPS ~ DESTIN_SZ + log(ORIGIN_AGE25_64) + log(dist), 
    family = poisson(link = "log"), data = SIM_data, na.action = na.exclude)

Coefficients:
                       Estimate Std. Error   z value Pr(>|z|)    
(Intercept)          19.3174878  0.0044874  4304.865  < 2e-16 ***
DESTIN_SZAMSZ02       0.1191704  0.0044773    26.617  < 2e-16 ***
DESTIN_SZAMSZ03       0.1078549  0.0043911    24.562  < 2e-16 ***
DESTIN_SZAMSZ04      -1.0515790  0.0063787  -164.857  < 2e-16 ***
DESTIN_SZAMSZ05      -1.1241092  0.0064528  -174.205  < 2e-16 ***
DESTIN_SZAMSZ06      -1.0692859  0.0064402  -166.032  < 2e-16 ***
DESTIN_SZAMSZ07      -1.5362342  0.0097145  -158.139  < 2e-16 ***
DESTIN_SZAMSZ08      -0.5040655  0.0068854   -73.208  < 2e-16 ***
DESTIN_SZAMSZ09      -0.8920486  0.0065654  -135.872  < 2e-16 ***
DESTIN_SZAMSZ10       0.0580328  0.0045926    12.636  < 2e-16 ***
DESTIN_SZAMSZ11      -0.4055171  0.0086713   -46.765  < 2e-16 ***
DESTIN_SZAMSZ12       0.3630434  0.0050200    72.320  < 2e-16 ***
DESTIN_SZBDSZ01       1.0060750  0.0039763   253.017  < 2e-16 ***
DESTIN_SZBDSZ02       0.2294016  0.0052376    43.799  < 2e-16 ***
DESTIN_SZBDSZ03       0.3255199  0.0047761    68.156  < 2e-16 ***
DESTIN_SZBDSZ04       1.2808827  0.0038167   335.596  < 2e-16 ***
DESTIN_SZBDSZ05       0.9039686  0.0040921   220.906  < 2e-16 ***
DESTIN_SZBDSZ06       0.6176218  0.0046559   132.653  < 2e-16 ***
DESTIN_SZBDSZ07      -0.5303050  0.0096229   -55.109  < 2e-16 ***
DESTIN_SZBDSZ08      -1.2026996  0.0109425  -109.911  < 2e-16 ***
DESTIN_SZBKSZ01      -1.0408499  0.0067517  -154.161  < 2e-16 ***
DESTIN_SZBKSZ02      -0.2277550  0.0056050   -40.634  < 2e-16 ***
DESTIN_SZBKSZ03      -0.6927463  0.0060023  -115.413  < 2e-16 ***
DESTIN_SZBKSZ04      -0.2764020  0.0050053   -55.222  < 2e-16 ***
DESTIN_SZBKSZ05      -0.8937497  0.0066225  -134.957  < 2e-16 ***
DESTIN_SZBKSZ06      -0.9623865  0.0062223  -154.667  < 2e-16 ***
DESTIN_SZBKSZ07       0.0950717  0.0042401    22.422  < 2e-16 ***
DESTIN_SZBKSZ08      -1.2348728  0.0070344  -175.547  < 2e-16 ***
DESTIN_SZBKSZ09      -0.1142258  0.0049953   -22.867  < 2e-16 ***
DESTIN_SZBLSZ01      -0.2105521  0.0070547   -29.846  < 2e-16 ***
DESTIN_SZBLSZ02       0.7245710  0.0065383   110.819  < 2e-16 ***
DESTIN_SZBLSZ03       2.0509336  0.0074325   275.940  < 2e-16 ***
DESTIN_SZBLSZ04       0.4060930  0.0132286    30.698  < 2e-16 ***
DESTIN_SZBMSZ01      -0.0319591  0.0049381    -6.472 9.68e-11 ***
DESTIN_SZBMSZ02      -0.8956122  0.0049560  -180.714  < 2e-16 ***
DESTIN_SZBMSZ03      -1.1137701  0.0057286  -194.424  < 2e-16 ***
DESTIN_SZBMSZ04      -1.0650594  0.0051438  -207.059  < 2e-16 ***
DESTIN_SZBMSZ05      -1.0506824  0.0069501  -151.176  < 2e-16 ***
DESTIN_SZBMSZ06      -2.1441719  0.0131528  -163.020  < 2e-16 ***
DESTIN_SZBMSZ07      -0.2684387  0.0046633   -57.565  < 2e-16 ***
DESTIN_SZBMSZ08      -1.6875691  0.0065033  -259.494  < 2e-16 ***
DESTIN_SZBMSZ09      -3.1074787  0.0152465  -203.816  < 2e-16 ***
DESTIN_SZBMSZ10      -2.2594754  0.0089387  -252.774  < 2e-16 ***
DESTIN_SZBMSZ11      -2.0437882  0.0080887  -252.672  < 2e-16 ***
DESTIN_SZBMSZ12      -1.5042559  0.0080038  -187.943  < 2e-16 ***
DESTIN_SZBMSZ13      -0.5619954  0.0053957  -104.155  < 2e-16 ***
DESTIN_SZBMSZ14      -1.7206419  0.0077676  -221.514  < 2e-16 ***
DESTIN_SZBMSZ15      -1.4869230  0.0071075  -209.204  < 2e-16 ***
DESTIN_SZBMSZ16      -2.1336196  0.0113918  -187.294  < 2e-16 ***
DESTIN_SZBMSZ17      -2.3194650  0.0165782  -139.910  < 2e-16 ***
DESTIN_SZBPSZ01      -0.7515972  0.0056468  -133.101  < 2e-16 ***
DESTIN_SZBPSZ02      -1.7048315  0.0084980  -200.616  < 2e-16 ***
DESTIN_SZBPSZ03      -1.3770138  0.0081263  -169.451  < 2e-16 ***
DESTIN_SZBPSZ04      -0.5249644  0.0059698   -87.937  < 2e-16 ***
DESTIN_SZBPSZ05       0.4444769  0.0040663   109.308  < 2e-16 ***
DESTIN_SZBPSZ06      -0.7688952  0.0078508   -97.938  < 2e-16 ***
DESTIN_SZBPSZ07      -0.0832563  0.0080289   -10.370  < 2e-16 ***
DESTIN_SZBSSZ01       0.0469650  0.0049756     9.439  < 2e-16 ***
DESTIN_SZBSSZ02      -0.6657036  0.0056161  -118.534  < 2e-16 ***
DESTIN_SZBSSZ03       0.1861263  0.0041570    44.774  < 2e-16 ***
DESTIN_SZBTSZ01       0.4792098  0.0043659   109.762  < 2e-16 ***
DESTIN_SZBTSZ02      -0.0951026  0.0068290   -13.926  < 2e-16 ***
DESTIN_SZBTSZ03       0.0668426  0.0054563    12.251  < 2e-16 ***
DESTIN_SZBTSZ04      -1.2625756  0.0108353  -116.524  < 2e-16 ***
DESTIN_SZBTSZ05      -0.1506002  0.0069401   -21.700  < 2e-16 ***
DESTIN_SZBTSZ06      -0.7707905  0.0071082  -108.437  < 2e-16 ***
DESTIN_SZBTSZ07      -1.9349162  0.0110699  -174.791  < 2e-16 ***
DESTIN_SZBTSZ08      -1.4792389  0.0100378  -147.367  < 2e-16 ***
DESTIN_SZCBSZ01      -3.6598718  0.3162427   -11.573  < 2e-16 ***
DESTIN_SZCCSZ01      -0.1832358  0.0081564   -22.465  < 2e-16 ***
DESTIN_SZCHSZ01      -0.0906438  0.0097210    -9.325  < 2e-16 ***
DESTIN_SZCHSZ02       0.2054719  0.0053330    38.529  < 2e-16 ***
DESTIN_SZCHSZ03       2.6595684  0.0040305   659.865  < 2e-16 ***
DESTIN_SZCKSZ01      -0.0016843  0.0049002    -0.344    0.731    
DESTIN_SZCKSZ02      -0.4545506  0.0056428   -80.555  < 2e-16 ***
DESTIN_SZCKSZ03       0.6712421  0.0039208   171.201  < 2e-16 ***
DESTIN_SZCKSZ04      -0.3931396  0.0064851   -60.622  < 2e-16 ***
DESTIN_SZCKSZ05      -0.3451862  0.0067912   -50.829  < 2e-16 ***
DESTIN_SZCKSZ06       0.3464208  0.0063562    54.501  < 2e-16 ***
DESTIN_SZCLSZ01       0.2271343  0.0047828    47.490  < 2e-16 ***
DESTIN_SZCLSZ02      -2.0227401  0.0133559  -151.449  < 2e-16 ***
DESTIN_SZCLSZ03      -0.6701371  0.0079127   -84.692  < 2e-16 ***
DESTIN_SZCLSZ04      -0.0265685  0.0047160    -5.634 1.76e-08 ***
DESTIN_SZCLSZ05      -0.8406172  0.0084232   -99.798  < 2e-16 ***
DESTIN_SZCLSZ06       0.2602838  0.0042377    61.421  < 2e-16 ***
DESTIN_SZCLSZ07      -0.4613597  0.0054064   -85.336  < 2e-16 ***
DESTIN_SZCLSZ08      -0.3405745  0.0060605   -56.196  < 2e-16 ***
DESTIN_SZCLSZ09       0.2954783  0.0064320    45.939  < 2e-16 ***
DESTIN_SZDTSZ02      -2.6004589  0.0348415   -74.637  < 2e-16 ***
DESTIN_SZDTSZ03      -1.0453650  0.0144181   -72.504  < 2e-16 ***
DESTIN_SZDTSZ13      -1.7531920  0.0161502  -108.555  < 2e-16 ***
DESTIN_SZGLSZ01      -0.3340462  0.0051940   -64.314  < 2e-16 ***
DESTIN_SZGLSZ02      -0.2202963  0.0050274   -43.819  < 2e-16 ***
DESTIN_SZGLSZ03       0.6533201  0.0040605   160.898  < 2e-16 ***
DESTIN_SZGLSZ04       0.5852771  0.0040616   144.101  < 2e-16 ***
DESTIN_SZGLSZ05       0.6500643  0.0040660   159.876  < 2e-16 ***
DESTIN_SZHGSZ01       0.3288835  0.0039346    83.587  < 2e-16 ***
DESTIN_SZHGSZ02      -0.5011687  0.0054171   -92.516  < 2e-16 ***
DESTIN_SZHGSZ03      -0.9816678  0.0064199  -152.910  < 2e-16 ***
DESTIN_SZHGSZ04      -0.1573402  0.0045848   -34.318  < 2e-16 ***
DESTIN_SZHGSZ05      -0.2540233  0.0048825   -52.027  < 2e-16 ***
DESTIN_SZHGSZ06      -0.7130778  0.0057860  -123.242  < 2e-16 ***
DESTIN_SZHGSZ07       0.1425681  0.0045488    31.342  < 2e-16 ***
DESTIN_SZHGSZ08      -0.1288761  0.0050545   -25.497  < 2e-16 ***
DESTIN_SZHGSZ09       0.1342916  0.0052777    25.445  < 2e-16 ***
DESTIN_SZHGSZ10      -3.3121161  0.0262186  -126.327  < 2e-16 ***
DESTIN_SZJESZ01       0.0216364  0.0050217     4.309 1.64e-05 ***
DESTIN_SZJESZ02      -0.4502278  0.0052909   -85.095  < 2e-16 ***
DESTIN_SZJESZ03      -0.5379992  0.0057901   -92.917  < 2e-16 ***
DESTIN_SZJESZ04      -0.5488314  0.0068410   -80.227  < 2e-16 ***
DESTIN_SZJESZ05      -1.0252722  0.0098376  -104.220  < 2e-16 ***
DESTIN_SZJESZ06       0.3600249  0.0040951    87.917  < 2e-16 ***
DESTIN_SZJESZ07      -1.1741937  0.0081690  -143.738  < 2e-16 ***
DESTIN_SZJESZ08      -0.3232324  0.0079062   -40.884  < 2e-16 ***
DESTIN_SZJESZ09       0.1773240  0.0058326    30.402  < 2e-16 ***
DESTIN_SZJESZ10       1.2098932  0.0069903   173.082  < 2e-16 ***
DESTIN_SZJESZ11       0.8859549  0.0065926   134.386  < 2e-16 ***
DESTIN_SZJWSZ01      -0.0735287  0.0066154   -11.115  < 2e-16 ***
DESTIN_SZJWSZ02      -0.0046865  0.0053345    -0.879    0.380    
DESTIN_SZJWSZ03       0.9916788  0.0041074   241.437  < 2e-16 ***
DESTIN_SZJWSZ04       0.8491763  0.0042982   197.565  < 2e-16 ***
DESTIN_SZJWSZ05      -0.3644547  0.0061325   -59.430  < 2e-16 ***
DESTIN_SZJWSZ06       0.3279493  0.0054885    59.752  < 2e-16 ***
DESTIN_SZJWSZ07      -0.4173043  0.0282917   -14.750  < 2e-16 ***
DESTIN_SZJWSZ08       0.8725123  0.0049262   177.118  < 2e-16 ***
DESTIN_SZJWSZ09       1.7499191  0.0035305   495.659  < 2e-16 ***
DESTIN_SZKLSZ01      -0.5783996  0.0055562  -104.100  < 2e-16 ***
DESTIN_SZKLSZ02      -0.7542503  0.0058854  -128.157  < 2e-16 ***
DESTIN_SZKLSZ03      -1.1480172  0.0066481  -172.683  < 2e-16 ***
DESTIN_SZKLSZ04      -1.7364667  0.0088299  -196.657  < 2e-16 ***
DESTIN_SZKLSZ05      -0.6571193  0.0085734   -76.647  < 2e-16 ***
DESTIN_SZKLSZ06      -3.0846942  0.0362084   -85.193  < 2e-16 ***
DESTIN_SZKLSZ07      -1.0843341  0.0067174  -161.421  < 2e-16 ***
DESTIN_SZKLSZ08      -0.7168096  0.0052084  -137.626  < 2e-16 ***
DESTIN_SZLKSZ01      -0.3926093  0.0205594   -19.096  < 2e-16 ***
DESTIN_SZMDSZ01      -0.6873959  0.0200285   -34.321  < 2e-16 ***
DESTIN_SZMDSZ02      -0.8552805  0.0112077   -76.312  < 2e-16 ***
DESTIN_SZMDSZ03      -2.6273198  0.0252255  -104.153  < 2e-16 ***
DESTIN_SZMPSZ01      -0.5827241  0.0078470   -74.261  < 2e-16 ***
DESTIN_SZMPSZ02      -0.5848508  0.0061455   -95.168  < 2e-16 ***
DESTIN_SZMPSZ03       0.2888162  0.0048988    58.957  < 2e-16 ***
DESTIN_SZMUSZ02      -2.6888097  0.0199678  -134.658  < 2e-16 ***
DESTIN_SZNTSZ01      -3.9477895  0.0447770   -88.166  < 2e-16 ***
DESTIN_SZNTSZ02      -1.8818424  0.0108999  -172.648  < 2e-16 ***
DESTIN_SZNTSZ03      -1.4337379  0.0076824  -186.626  < 2e-16 ***
DESTIN_SZNTSZ05      -1.9827445  0.0249764   -79.385  < 2e-16 ***
DESTIN_SZNTSZ06      -2.8268116  0.0428690   -65.941  < 2e-16 ***
DESTIN_SZNVSZ01      -0.4761004  0.0048428   -98.312  < 2e-16 ***
DESTIN_SZNVSZ02      -0.4567368  0.0054397   -83.963  < 2e-16 ***
DESTIN_SZNVSZ03      -0.3742967  0.0055432   -67.524  < 2e-16 ***
DESTIN_SZNVSZ04      -1.7789484  0.0108877  -163.391  < 2e-16 ***
DESTIN_SZNVSZ05      -1.5056497  0.0090744  -165.923  < 2e-16 ***
DESTIN_SZPGSZ01      -1.2450173  0.0158155   -78.721  < 2e-16 ***
DESTIN_SZPGSZ02      -0.7508527  0.0069655  -107.796  < 2e-16 ***
DESTIN_SZPGSZ03       0.2466963  0.0045098    54.702  < 2e-16 ***
DESTIN_SZPGSZ04       0.2183136  0.0046335    47.116  < 2e-16 ***
DESTIN_SZPGSZ05      -0.7375581  0.0079069   -93.281  < 2e-16 ***
DESTIN_SZPLSZ01      -0.0165617  0.0071779    -2.307    0.021 *  
DESTIN_SZPLSZ02      -1.2275729  0.0133082   -92.242  < 2e-16 ***
DESTIN_SZPLSZ03      -0.1097448  0.0095959   -11.437  < 2e-16 ***
DESTIN_SZPLSZ04      -1.2147663  0.0094077  -129.125  < 2e-16 ***
DESTIN_SZPLSZ05      -0.2499662  0.0117054   -21.355  < 2e-16 ***
DESTIN_SZPNSZ01       1.0179958  0.0060961   166.990  < 2e-16 ***
DESTIN_SZPNSZ02       2.2918528  0.0064994   352.625  < 2e-16 ***
DESTIN_SZPNSZ03       1.0861145  0.0077155   140.770  < 2e-16 ***
DESTIN_SZPNSZ04       2.8392187  0.0076270   372.261  < 2e-16 ***
DESTIN_SZPNSZ05       2.0314119  0.0117068   173.525  < 2e-16 ***
DESTIN_SZPRSZ01      -0.6909735  0.0086392   -79.981  < 2e-16 ***
DESTIN_SZPRSZ02       0.3340103  0.0053022    62.994  < 2e-16 ***
DESTIN_SZPRSZ03       0.9805752  0.0039615   247.527  < 2e-16 ***
DESTIN_SZPRSZ04       0.0579315  0.0081119     7.142 9.23e-13 ***
DESTIN_SZPRSZ05       0.3755539  0.0049934    75.210  < 2e-16 ***
DESTIN_SZPRSZ06       0.4900142  0.0055218    88.742  < 2e-16 ***
DESTIN_SZPRSZ07      -1.5290486  0.0118420  -129.121  < 2e-16 ***
DESTIN_SZPRSZ08      -0.1807124  0.0065582   -27.555  < 2e-16 ***
DESTIN_SZQTSZ01      -1.0772745  0.0086434  -124.636  < 2e-16 ***
DESTIN_SZQTSZ02      -1.3197772  0.0074726  -176.615  < 2e-16 ***
DESTIN_SZQTSZ03      -1.2512391  0.0069209  -180.792  < 2e-16 ***
DESTIN_SZQTSZ04      -1.1454203  0.0068834  -166.404  < 2e-16 ***
DESTIN_SZQTSZ05      -1.1936837  0.0064953  -183.777  < 2e-16 ***
DESTIN_SZQTSZ06      -1.3285903  0.0067683  -196.297  < 2e-16 ***
DESTIN_SZQTSZ07      -1.6142343  0.0109655  -147.210  < 2e-16 ***
DESTIN_SZQTSZ08      -0.2081946  0.0051794   -40.197  < 2e-16 ***
DESTIN_SZQTSZ09      -0.7425093  0.0061130  -121.464  < 2e-16 ***
DESTIN_SZQTSZ10      -0.0690038  0.0055346   -12.468  < 2e-16 ***
DESTIN_SZQTSZ11      -0.0842897  0.0056434   -14.936  < 2e-16 ***
DESTIN_SZQTSZ12      -0.9234541  0.0082632  -111.755  < 2e-16 ***
DESTIN_SZQTSZ13       0.2103939  0.0057731    36.444  < 2e-16 ***
DESTIN_SZQTSZ14       0.1225968  0.0066223    18.513  < 2e-16 ***
DESTIN_SZQTSZ15       0.6643941  0.0078678    84.445  < 2e-16 ***
DESTIN_SZRCSZ01      -0.7824588  0.0071907  -108.816  < 2e-16 ***
DESTIN_SZRCSZ06      -1.4744760  0.0188871   -78.068  < 2e-16 ***
DESTIN_SZRVSZ01      -2.6526487  0.0162425  -163.315  < 2e-16 ***
DESTIN_SZRVSZ02      -2.6558232  0.0326182   -81.421  < 2e-16 ***
DESTIN_SZRVSZ03      -2.5638290  0.0136476  -187.859  < 2e-16 ***
DESTIN_SZRVSZ04      -2.2999108  0.0155020  -148.362  < 2e-16 ***
DESTIN_SZRVSZ05      -3.7499167  0.0262073  -143.087  < 2e-16 ***
DESTIN_SZSBSZ01      -1.1461594  0.0091462  -125.316  < 2e-16 ***
DESTIN_SZSBSZ02      -1.0429709  0.0077134  -135.215  < 2e-16 ***
DESTIN_SZSBSZ03       0.7170403  0.0043804   163.694  < 2e-16 ***
DESTIN_SZSBSZ04       0.6221775  0.0052894   117.626  < 2e-16 ***
DESTIN_SZSBSZ05      -0.9350093  0.0077024  -121.393  < 2e-16 ***
DESTIN_SZSBSZ06      -1.3858120  0.0221880   -62.458  < 2e-16 ***
DESTIN_SZSBSZ07       0.4060645  0.0181981    22.314  < 2e-16 ***
DESTIN_SZSBSZ08       1.4590891  0.0052348   278.730  < 2e-16 ***
DESTIN_SZSBSZ09       0.5786654  0.0048921   118.286  < 2e-16 ***
DESTIN_SZSESZ02      -0.0743241  0.0049267   -15.086  < 2e-16 ***
DESTIN_SZSESZ03       0.6080690  0.0038671   157.242  < 2e-16 ***
DESTIN_SZSESZ04      -0.5893886  0.0057469  -102.558  < 2e-16 ***
DESTIN_SZSESZ05      -0.2967695  0.0048648   -61.004  < 2e-16 ***
DESTIN_SZSESZ06      -0.2953067  0.0064234   -45.974  < 2e-16 ***
DESTIN_SZSESZ07      -2.7047919  0.0227296  -118.999  < 2e-16 ***
DESTIN_SZSGSZ01      -0.0708513  0.0058798   -12.050  < 2e-16 ***
DESTIN_SZSGSZ02      -0.0331087  0.0052437    -6.314 2.72e-10 ***
DESTIN_SZSGSZ03      -0.1878972  0.0048773   -38.525  < 2e-16 ***
DESTIN_SZSGSZ04      -0.1436643  0.0049574   -28.980  < 2e-16 ***
DESTIN_SZSGSZ05      -2.1277127  0.0100494  -211.725  < 2e-16 ***
DESTIN_SZSGSZ06       0.4639625  0.0039121   118.596  < 2e-16 ***
DESTIN_SZSGSZ07      -0.3923880  0.0053073   -73.933  < 2e-16 ***
DESTIN_SZSISZ01      -1.2823326  0.0257841   -49.733  < 2e-16 ***
DESTIN_SZSKSZ01       0.3506453  0.0072743    48.204  < 2e-16 ***
DESTIN_SZSKSZ02       1.5818816  0.0050613   312.543  < 2e-16 ***
DESTIN_SZSKSZ03       0.2470622  0.0059980    41.191  < 2e-16 ***
DESTIN_SZSKSZ04      -0.1797335  0.0140461   -12.796  < 2e-16 ***
DESTIN_SZSKSZ05       0.7220873  0.0105344    68.545  < 2e-16 ***
DESTIN_SZSLSZ01      -0.2682827  0.0083834   -32.002  < 2e-16 ***
DESTIN_SZSLSZ04      -0.4257565  0.0071360   -59.663  < 2e-16 ***
DESTIN_SZSRSZ01      -2.7348846  0.0130099  -210.216  < 2e-16 ***
DESTIN_SZTHSZ01      -3.3089856  0.0366861   -90.197  < 2e-16 ***
DESTIN_SZTHSZ03      -1.9372568  0.0251019   -77.176  < 2e-16 ***
DESTIN_SZTHSZ04      -2.5939828  0.0213727  -121.369  < 2e-16 ***
DESTIN_SZTHSZ06      -1.9960847  0.0153485  -130.051  < 2e-16 ***
DESTIN_SZTMSZ01       0.4076693  0.0055911    72.914  < 2e-16 ***
DESTIN_SZTMSZ02       1.9259335  0.0034801   553.419  < 2e-16 ***
DESTIN_SZTMSZ03       1.1909948  0.0039856   298.824  < 2e-16 ***
DESTIN_SZTMSZ04       1.5217997  0.0039213   388.081  < 2e-16 ***
DESTIN_SZTMSZ05       1.0042554  0.0056779   176.872  < 2e-16 ***
DESTIN_SZTNSZ01      -0.9786725  0.0071587  -136.711  < 2e-16 ***
DESTIN_SZTNSZ02      -2.1152442  0.0099136  -213.369  < 2e-16 ***
DESTIN_SZTNSZ03      -2.0381861  0.0117106  -174.046  < 2e-16 ***
DESTIN_SZTNSZ04      -0.9321744  0.0071900  -129.648  < 2e-16 ***
DESTIN_SZTPSZ01      -0.6889742  0.0059587  -115.624  < 2e-16 ***
DESTIN_SZTPSZ02       0.3054087  0.0038310    79.721  < 2e-16 ***
DESTIN_SZTPSZ03      -0.7424134  0.0056300  -131.868  < 2e-16 ***
DESTIN_SZTPSZ04      -1.6884798  0.0073617  -229.359  < 2e-16 ***
DESTIN_SZTPSZ05      -1.2242061  0.0058265  -210.111  < 2e-16 ***
DESTIN_SZTPSZ06      -0.8027021  0.0063397  -126.616  < 2e-16 ***
DESTIN_SZTPSZ07      -2.2733422  0.0116714  -194.779  < 2e-16 ***
DESTIN_SZTPSZ08      -1.5629751  0.0091068  -171.627  < 2e-16 ***
DESTIN_SZTPSZ09      -0.5213204  0.0067798   -76.894  < 2e-16 ***
DESTIN_SZTPSZ10      -1.5405668  0.0088453  -174.167  < 2e-16 ***
DESTIN_SZTPSZ11      -0.3590295  0.0053503   -67.104  < 2e-16 ***
DESTIN_SZTPSZ12      -0.8471914  0.0064016  -132.340  < 2e-16 ***
DESTIN_SZTSSZ01       0.3601972  0.0209066    17.229  < 2e-16 ***
DESTIN_SZTSSZ02       1.1511920  0.0133733    86.081  < 2e-16 ***
DESTIN_SZTSSZ03       2.2050639  0.0076710   287.455  < 2e-16 ***
DESTIN_SZTSSZ04       1.9483194  0.0080326   242.552  < 2e-16 ***
DESTIN_SZTSSZ05       2.9897329  0.0075194   397.604  < 2e-16 ***
DESTIN_SZTSSZ06       3.5293877  0.0141456   249.505  < 2e-16 ***
DESTIN_SZWCSZ01       2.9055772  0.0046449   625.542  < 2e-16 ***
DESTIN_SZWCSZ02      -0.9587249  0.0123688   -77.511  < 2e-16 ***
DESTIN_SZWCSZ03      -1.8482203  0.0325154   -56.841  < 2e-16 ***
DESTIN_SZWDSZ01       1.4828743  0.0035172   421.604  < 2e-16 ***
DESTIN_SZWDSZ02      -0.1326910  0.0059446   -22.321  < 2e-16 ***
DESTIN_SZWDSZ03       0.9057458  0.0045064   200.992  < 2e-16 ***
DESTIN_SZWDSZ04       0.0501618  0.0067616     7.419 1.18e-13 ***
DESTIN_SZWDSZ05       0.0859426  0.0066889    12.849  < 2e-16 ***
DESTIN_SZWDSZ06       0.7726353  0.0045597   169.450  < 2e-16 ***
DESTIN_SZWDSZ07      -0.1381768  0.0063899   -21.624  < 2e-16 ***
DESTIN_SZWDSZ08       0.2734527  0.0062547    43.719  < 2e-16 ***
DESTIN_SZWDSZ09       1.2089199  0.0046579   259.539  < 2e-16 ***
DESTIN_SZYSSZ01       0.8509929  0.0038910   218.706  < 2e-16 ***
DESTIN_SZYSSZ02       0.3372571  0.0051028    66.093  < 2e-16 ***
DESTIN_SZYSSZ03      -0.0594889  0.0061746    -9.635  < 2e-16 ***
DESTIN_SZYSSZ04       0.0470398  0.0052771     8.914  < 2e-16 ***
DESTIN_SZYSSZ05      -0.9994384  0.0108536   -92.084  < 2e-16 ***
DESTIN_SZYSSZ06      -1.2678426  0.0106183  -119.402  < 2e-16 ***
DESTIN_SZYSSZ07      -0.6526080  0.0142273   -45.870  < 2e-16 ***
DESTIN_SZYSSZ08       1.0506169  0.0040056   262.287  < 2e-16 ***
DESTIN_SZYSSZ09       0.4584003  0.0042185   108.663  < 2e-16 ***
log(ORIGIN_AGE25_64)  0.2043532  0.0001495  1367.295  < 2e-16 ***
log(dist)            -1.7458136  0.0004145 -4212.137  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 47094011  on 14470  degrees of freedom
Residual deviance: 15963058  on 14189  degrees of freedom
AIC: 16052761

Number of Fisher Scoring iterations: 7

Let’s check the R-square values of destination constrained SIM model this time.

CalcRSquared(decSIM$data$TRIPS, decSIM$fitted.values)
[1] 0.5123583

It’s interesting to see that R-squared improves than origin constrained model.

9.6 Doubly Constrained Spatial Interaction Model

In this section, we will calibrate a doubly constrained SIM. For doubly constrained SIM, both the attractiveness at the destinations and the propulsiveness at the origins are considered. The model is typically expressed in the form of a distance function between the origin and destination.

dbcSIM <- glm(formula = TRIPS ~ 
                ORIGIN_SZ + 
                DESTIN_SZ + 
                log(dist),
              family = poisson(link = "log"),
              data = SIM_data,
              na.action = na.exclude)
summary(dbcSIM)

Call:
glm(formula = TRIPS ~ ORIGIN_SZ + DESTIN_SZ + log(dist), family = poisson(link = "log"), 
    data = SIM_data, na.action = na.exclude)

Coefficients:
                  Estimate Std. Error   z value Pr(>|z|)    
(Intercept)     21.8312374  0.0059160  3690.190  < 2e-16 ***
ORIGIN_SZAMSZ02  0.5263502  0.0048031   109.585  < 2e-16 ***
ORIGIN_SZAMSZ03  0.3139982  0.0049254    63.751  < 2e-16 ***
ORIGIN_SZAMSZ04 -0.2146257  0.0053639   -40.013  < 2e-16 ***
ORIGIN_SZAMSZ05 -0.1890446  0.0060386   -31.306  < 2e-16 ***
ORIGIN_SZAMSZ06  0.1539201  0.0054401    28.294  < 2e-16 ***
ORIGIN_SZAMSZ07 -0.9826565  0.0098676   -99.584  < 2e-16 ***
ORIGIN_SZAMSZ08 -0.4488417  0.0093070   -48.226  < 2e-16 ***
ORIGIN_SZAMSZ09  0.0713474  0.0057402    12.429  < 2e-16 ***
ORIGIN_SZAMSZ10  0.4313742  0.0050370    85.641  < 2e-16 ***
ORIGIN_SZAMSZ11 -1.4712226  0.0131178  -112.154  < 2e-16 ***
ORIGIN_SZAMSZ12 -1.7250733  0.0111603  -154.573  < 2e-16 ***
ORIGIN_SZBDSZ01  0.8810576  0.0048168   182.914  < 2e-16 ***
ORIGIN_SZBDSZ02  0.1100240  0.0055529    19.814  < 2e-16 ***
ORIGIN_SZBDSZ03  0.3606166  0.0050672    71.167  < 2e-16 ***
ORIGIN_SZBDSZ04  1.4624347  0.0044212   330.781  < 2e-16 ***
ORIGIN_SZBDSZ05  0.6207557  0.0050843   122.092  < 2e-16 ***
ORIGIN_SZBDSZ06  0.6712973  0.0051953   129.214  < 2e-16 ***
ORIGIN_SZBDSZ07 -1.2338669  0.0100775  -122.437  < 2e-16 ***
ORIGIN_SZBDSZ08 -1.0444562  0.0094555  -110.460  < 2e-16 ***
ORIGIN_SZBKSZ01 -0.2838426  0.0071354   -39.780  < 2e-16 ***
ORIGIN_SZBKSZ02  0.5550522  0.0059014    94.054  < 2e-16 ***
ORIGIN_SZBKSZ03  0.7396640  0.0056796   130.231  < 2e-16 ***
ORIGIN_SZBKSZ04 -0.2242451  0.0067482   -33.230  < 2e-16 ***
ORIGIN_SZBKSZ05 -0.2371614  0.0069386   -34.180  < 2e-16 ***
ORIGIN_SZBKSZ06 -0.1413812  0.0065035   -21.739  < 2e-16 ***
ORIGIN_SZBKSZ07  0.7089989  0.0051843   136.758  < 2e-16 ***
ORIGIN_SZBKSZ08 -0.0907065  0.0059157   -15.333  < 2e-16 ***
ORIGIN_SZBKSZ09 -0.1775146  0.0063302   -28.042  < 2e-16 ***
ORIGIN_SZBLSZ01 -2.3684539  0.0154280  -153.516  < 2e-16 ***
ORIGIN_SZBLSZ02 -2.8078475  0.0197839  -141.926  < 2e-16 ***
ORIGIN_SZBLSZ03 -3.3122763  0.0466091   -71.065  < 2e-16 ***
ORIGIN_SZBLSZ04 -2.6770542  0.0241793  -110.717  < 2e-16 ***
ORIGIN_SZBMSZ01  0.0618035  0.0059400    10.405  < 2e-16 ***
ORIGIN_SZBMSZ02 -1.3535767  0.0073741  -183.557  < 2e-16 ***
ORIGIN_SZBMSZ03 -0.7569095  0.0063187  -119.790  < 2e-16 ***
ORIGIN_SZBMSZ04 -0.2949304  0.0059603   -49.483  < 2e-16 ***
ORIGIN_SZBMSZ05 -2.6131992  0.0172376  -151.599  < 2e-16 ***
ORIGIN_SZBMSZ06 -3.0315024  0.0185502  -163.422  < 2e-16 ***
ORIGIN_SZBMSZ07 -0.6962524  0.0064068  -108.674  < 2e-16 ***
ORIGIN_SZBMSZ08 -0.9310730  0.0064541  -144.261  < 2e-16 ***
ORIGIN_SZBMSZ09 -1.2911253  0.0092047  -140.268  < 2e-16 ***
ORIGIN_SZBMSZ10 -1.6687004  0.0095708  -174.353  < 2e-16 ***
ORIGIN_SZBMSZ11 -1.1152794  0.0072027  -154.841  < 2e-16 ***
ORIGIN_SZBMSZ12 -1.5323954  0.0099932  -153.344  < 2e-16 ***
ORIGIN_SZBMSZ13 -0.6267376  0.0065863   -95.158  < 2e-16 ***
ORIGIN_SZBMSZ14 -1.0475467  0.0072472  -144.544  < 2e-16 ***
ORIGIN_SZBMSZ15 -0.5049444  0.0067390   -74.929  < 2e-16 ***
ORIGIN_SZBMSZ16 -1.5282897  0.0099545  -153.527  < 2e-16 ***
ORIGIN_SZBMSZ17 -1.5722349  0.0161533   -97.332  < 2e-16 ***
ORIGIN_SZBPSZ01  0.5814175  0.0062904    92.429  < 2e-16 ***
ORIGIN_SZBPSZ02  0.0875442  0.0072190    12.127  < 2e-16 ***
ORIGIN_SZBPSZ03  0.3358227  0.0070460    47.662  < 2e-16 ***
ORIGIN_SZBPSZ04  0.6507586  0.0057726   112.733  < 2e-16 ***
ORIGIN_SZBPSZ05  0.9502124  0.0052971   179.384  < 2e-16 ***
ORIGIN_SZBPSZ06 -1.0480314  0.0098191  -106.734  < 2e-16 ***
ORIGIN_SZBPSZ07 -0.5467931  0.0091676   -59.644  < 2e-16 ***
ORIGIN_SZBSSZ01  0.2998334  0.0059193    50.654  < 2e-16 ***
ORIGIN_SZBSSZ02  0.2841036  0.0050863    55.856  < 2e-16 ***
ORIGIN_SZBSSZ03 -0.2331505  0.0056565   -41.218  < 2e-16 ***
ORIGIN_SZBTSZ01  0.0987284  0.0063715    15.495  < 2e-16 ***
ORIGIN_SZBTSZ02 -0.6261229  0.0084604   -74.006  < 2e-16 ***
ORIGIN_SZBTSZ03 -0.4326963  0.0073452   -58.909  < 2e-16 ***
ORIGIN_SZBTSZ04 -1.4998668  0.0110013  -136.336  < 2e-16 ***
ORIGIN_SZBTSZ05 -0.9564768  0.0122202   -78.270  < 2e-16 ***
ORIGIN_SZBTSZ06 -1.2853131  0.0099328  -129.401  < 2e-16 ***
ORIGIN_SZBTSZ07 -2.3870991  0.0144589  -165.096  < 2e-16 ***
ORIGIN_SZBTSZ08 -1.3715855  0.0113825  -120.499  < 2e-16 ***
ORIGIN_SZCBSZ01 -3.5940232  0.0548979   -65.467  < 2e-16 ***
ORIGIN_SZCCSZ01 -0.7008220  0.0140373   -49.926  < 2e-16 ***
ORIGIN_SZCHSZ01 -0.9109524  0.0122869   -74.140  < 2e-16 ***
ORIGIN_SZCHSZ02 -0.8566547  0.0088749   -96.526  < 2e-16 ***
ORIGIN_SZCHSZ03  1.1153731  0.0066136   168.650  < 2e-16 ***
ORIGIN_SZCKSZ01  0.3001815  0.0058548    51.271  < 2e-16 ***
ORIGIN_SZCKSZ02  0.7185711  0.0060595   118.585  < 2e-16 ***
ORIGIN_SZCKSZ03  1.1389824  0.0053179   214.178  < 2e-16 ***
ORIGIN_SZCKSZ04  1.6281772  0.0054761   297.324  < 2e-16 ***
ORIGIN_SZCKSZ05  0.8338470  0.0064178   129.927  < 2e-16 ***
ORIGIN_SZCKSZ06  0.6528993  0.0082375    79.259  < 2e-16 ***
ORIGIN_SZCLSZ01 -0.7174758  0.0082123   -87.366  < 2e-16 ***
ORIGIN_SZCLSZ02 -1.7513100  0.0139062  -125.938  < 2e-16 ***
ORIGIN_SZCLSZ03 -1.0362873  0.0085485  -121.224  < 2e-16 ***
ORIGIN_SZCLSZ04  0.6160017  0.0051276   120.136  < 2e-16 ***
ORIGIN_SZCLSZ05 -2.1005122  0.0150228  -139.821  < 2e-16 ***
ORIGIN_SZCLSZ06  0.7252108  0.0049447   146.665  < 2e-16 ***
ORIGIN_SZCLSZ07 -0.5343482  0.0062500   -85.496  < 2e-16 ***
ORIGIN_SZCLSZ08 -0.2153408  0.0067571   -31.869  < 2e-16 ***
ORIGIN_SZCLSZ09 -1.8019961  0.0169078  -106.578  < 2e-16 ***
ORIGIN_SZDTSZ02 -3.9057711  0.0834668   -46.794  < 2e-16 ***
ORIGIN_SZDTSZ03 -3.4152419  0.0738650   -46.236  < 2e-16 ***
ORIGIN_SZDTSZ13 -3.0183438  0.0315257   -95.742  < 2e-16 ***
ORIGIN_SZGLSZ01 -1.7812384  0.0099367  -179.258  < 2e-16 ***
ORIGIN_SZGLSZ02 -0.1074991  0.0054325   -19.788  < 2e-16 ***
ORIGIN_SZGLSZ03 -0.2461106  0.0057176   -43.045  < 2e-16 ***
ORIGIN_SZGLSZ04  0.8657186  0.0046413   186.524  < 2e-16 ***
ORIGIN_SZGLSZ05  0.5871393  0.0047939   122.477  < 2e-16 ***
ORIGIN_SZHGSZ01  0.3543819  0.0050461    70.229  < 2e-16 ***
ORIGIN_SZHGSZ02  0.4218178  0.0050820    83.003  < 2e-16 ***
ORIGIN_SZHGSZ03  0.2411309  0.0054241    44.456  < 2e-16 ***
ORIGIN_SZHGSZ04  0.8180622  0.0046153   177.252  < 2e-16 ***
ORIGIN_SZHGSZ05  1.2173687  0.0045655   266.647  < 2e-16 ***
ORIGIN_SZHGSZ06 -0.1826300  0.0058214   -31.372  < 2e-16 ***
ORIGIN_SZHGSZ07  0.3172839  0.0050733    62.540  < 2e-16 ***
ORIGIN_SZHGSZ08 -0.1151369  0.0057067   -20.176  < 2e-16 ***
ORIGIN_SZHGSZ09 -1.2873441  0.0091690  -140.401  < 2e-16 ***
ORIGIN_SZHGSZ10 -3.3783178  0.0424682   -79.549  < 2e-16 ***
ORIGIN_SZJESZ01  0.4859234  0.0055927    86.885  < 2e-16 ***
ORIGIN_SZJESZ02  0.1766088  0.0055800    31.650  < 2e-16 ***
ORIGIN_SZJESZ03 -0.2177441  0.0059535   -36.574  < 2e-16 ***
ORIGIN_SZJESZ04 -1.5532182  0.0104526  -148.597  < 2e-16 ***
ORIGIN_SZJESZ05 -2.3332926  0.0142701  -163.509  < 2e-16 ***
ORIGIN_SZJESZ06  0.3007382  0.0055019    54.661  < 2e-16 ***
ORIGIN_SZJESZ07 -1.9687994  0.0121092  -162.587  < 2e-16 ***
ORIGIN_SZJESZ08 -1.3032070  0.0122024  -106.800  < 2e-16 ***
ORIGIN_SZJESZ09  0.5762635  0.0058766    98.061  < 2e-16 ***
ORIGIN_SZJESZ10 -1.4423113  0.0194773   -74.051  < 2e-16 ***
ORIGIN_SZJESZ11 -1.9720897  0.0200811   -98.206  < 2e-16 ***
ORIGIN_SZJWSZ01  0.3808627  0.0071357    53.374  < 2e-16 ***
ORIGIN_SZJWSZ02  0.7963999  0.0053150   149.840  < 2e-16 ***
ORIGIN_SZJWSZ03  1.5429636  0.0049961   308.834  < 2e-16 ***
ORIGIN_SZJWSZ04  0.6410760  0.0056711   113.042  < 2e-16 ***
ORIGIN_SZJWSZ05 -2.1571049  0.0133584  -161.479  < 2e-16 ***
ORIGIN_SZJWSZ06 -1.5174532  0.0113384  -133.833  < 2e-16 ***
ORIGIN_SZJWSZ07 -2.7089963  0.0280439   -96.598  < 2e-16 ***
ORIGIN_SZJWSZ08  1.5343415  0.0051711   296.713  < 2e-16 ***
ORIGIN_SZJWSZ09  1.8837410  0.0048845   385.656  < 2e-16 ***
ORIGIN_SZKLSZ01  0.1081286  0.0053307    20.284  < 2e-16 ***
ORIGIN_SZKLSZ02 -0.8844695  0.0067728  -130.591  < 2e-16 ***
ORIGIN_SZKLSZ03 -0.6872640  0.0062857  -109.337  < 2e-16 ***
ORIGIN_SZKLSZ04 -2.2090319  0.0122440  -180.418  < 2e-16 ***
ORIGIN_SZKLSZ05 -1.1728726  0.0110765  -105.888  < 2e-16 ***
ORIGIN_SZKLSZ06 -6.1162315  0.1857789   -32.922  < 2e-16 ***
ORIGIN_SZKLSZ07 -1.4082749  0.0092299  -152.578  < 2e-16 ***
ORIGIN_SZKLSZ08 -1.7781551  0.0104682  -169.862  < 2e-16 ***
ORIGIN_SZLKSZ01 -2.0531568  0.0398803   -51.483  < 2e-16 ***
ORIGIN_SZMDSZ01 -0.8825639  0.0287621   -30.685  < 2e-16 ***
ORIGIN_SZMDSZ02 -0.6219993  0.0107388   -57.921  < 2e-16 ***
ORIGIN_SZMDSZ03 -2.0840156  0.0173117  -120.382  < 2e-16 ***
ORIGIN_SZMPSZ01 -0.9659093  0.0086972  -111.060  < 2e-16 ***
ORIGIN_SZMPSZ02 -1.0411153  0.0073403  -141.836  < 2e-16 ***
ORIGIN_SZMPSZ03  0.0001659  0.0059401     0.028 0.977719    
ORIGIN_SZMUSZ02 -3.7599031  0.1037937   -36.225  < 2e-16 ***
ORIGIN_SZNTSZ01 -3.0388366  0.0355325   -85.523  < 2e-16 ***
ORIGIN_SZNTSZ02 -3.4230640  0.0235902  -145.106  < 2e-16 ***
ORIGIN_SZNTSZ03 -0.9094796  0.0082551  -110.172  < 2e-16 ***
ORIGIN_SZNTSZ05 -4.0861681  0.0499630   -81.784  < 2e-16 ***
ORIGIN_SZNTSZ06 -3.9497128  0.0565388   -69.858  < 2e-16 ***
ORIGIN_SZNVSZ01  0.3235636  0.0049439    65.447  < 2e-16 ***
ORIGIN_SZNVSZ02 -0.6946748  0.0070536   -98.485  < 2e-16 ***
ORIGIN_SZNVSZ03 -1.0540196  0.0083781  -125.806  < 2e-16 ***
ORIGIN_SZNVSZ04 -0.9897977  0.0093463  -105.903  < 2e-16 ***
ORIGIN_SZNVSZ05 -2.2578432  0.0169180  -133.458  < 2e-16 ***
ORIGIN_SZPGSZ01  0.2399827  0.0130436    18.398  < 2e-16 ***
ORIGIN_SZPGSZ02 -0.3352342  0.0078451   -42.732  < 2e-16 ***
ORIGIN_SZPGSZ03  0.9515148  0.0051376   185.207  < 2e-16 ***
ORIGIN_SZPGSZ04  1.3998952  0.0047991   291.697  < 2e-16 ***
ORIGIN_SZPGSZ05  0.4451629  0.0063423    70.189  < 2e-16 ***
ORIGIN_SZPLSZ01 -0.9705918  0.0122781   -79.050  < 2e-16 ***
ORIGIN_SZPLSZ02 -1.0670151  0.0153358   -69.577  < 2e-16 ***
ORIGIN_SZPLSZ03 -2.1229124  0.0373527   -56.834  < 2e-16 ***
ORIGIN_SZPLSZ04 -3.0911932  0.0371296   -83.254  < 2e-16 ***
ORIGIN_SZPLSZ05 -2.1705708  0.0226085   -96.007  < 2e-16 ***
ORIGIN_SZPNSZ01  0.9052637  0.0065952   137.262  < 2e-16 ***
ORIGIN_SZPNSZ02 -0.1720425  0.0125658   -13.691  < 2e-16 ***
ORIGIN_SZPNSZ03 -2.3973459  0.0201408  -119.029  < 2e-16 ***
ORIGIN_SZPNSZ04 -3.4483689  0.0343741  -100.319  < 2e-16 ***
ORIGIN_SZPNSZ05 -2.0588530  0.0282328   -72.924  < 2e-16 ***
ORIGIN_SZPRSZ01 -0.6399015  0.0120470   -53.117  < 2e-16 ***
ORIGIN_SZPRSZ02  0.8122270  0.0050886   159.617  < 2e-16 ***
ORIGIN_SZPRSZ03  0.3990960  0.0051810    77.031  < 2e-16 ***
ORIGIN_SZPRSZ04 -0.8485348  0.0079236  -107.089  < 2e-16 ***
ORIGIN_SZPRSZ05  0.8008791  0.0048532   165.021  < 2e-16 ***
ORIGIN_SZPRSZ06 -1.4498806  0.0121422  -119.408  < 2e-16 ***
ORIGIN_SZPRSZ07 -3.2025045  0.0167118  -191.631  < 2e-16 ***
ORIGIN_SZPRSZ08 -0.5862269  0.0067255   -87.165  < 2e-16 ***
ORIGIN_SZQTSZ01 -0.1859270  0.0075531   -24.616  < 2e-16 ***
ORIGIN_SZQTSZ02 -0.8715122  0.0068124  -127.929  < 2e-16 ***
ORIGIN_SZQTSZ03 -0.1259816  0.0064796   -19.443  < 2e-16 ***
ORIGIN_SZQTSZ04 -1.4620032  0.0079848  -183.098  < 2e-16 ***
ORIGIN_SZQTSZ05 -0.6675643  0.0069616   -95.892  < 2e-16 ***
ORIGIN_SZQTSZ06 -0.8190026  0.0072713  -112.634  < 2e-16 ***
ORIGIN_SZQTSZ07 -1.5189403  0.0099864  -152.101  < 2e-16 ***
ORIGIN_SZQTSZ08 -0.4976238  0.0067874   -73.316  < 2e-16 ***
ORIGIN_SZQTSZ09 -0.9006162  0.0075978  -118.536  < 2e-16 ***
ORIGIN_SZQTSZ10 -0.6690184  0.0071574   -93.473  < 2e-16 ***
ORIGIN_SZQTSZ11 -2.5203437  0.0147000  -171.452  < 2e-16 ***
ORIGIN_SZQTSZ12 -3.0461675  0.0190193  -160.162  < 2e-16 ***
ORIGIN_SZQTSZ13 -0.7501068  0.0084481   -88.791  < 2e-16 ***
ORIGIN_SZQTSZ14 -1.9321849  0.0126114  -153.209  < 2e-16 ***
ORIGIN_SZQTSZ15 -0.9576828  0.0127157   -75.315  < 2e-16 ***
ORIGIN_SZRCSZ01 -1.8167951  0.0129234  -140.582  < 2e-16 ***
ORIGIN_SZRCSZ06 -0.5560563  0.0090507   -61.438  < 2e-16 ***
ORIGIN_SZRVSZ01 -2.8862570  0.0325532   -88.663  < 2e-16 ***
ORIGIN_SZRVSZ02 -3.1555662  0.0281279  -112.186  < 2e-16 ***
ORIGIN_SZRVSZ03 -2.9836089  0.0248449  -120.089  < 2e-16 ***
ORIGIN_SZRVSZ04 -3.5520422  0.0561371   -63.274  < 2e-16 ***
ORIGIN_SZRVSZ05 -2.5866584  0.0180382  -143.399  < 2e-16 ***
ORIGIN_SZSBSZ01  0.2867444  0.0071098    40.331  < 2e-16 ***
ORIGIN_SZSBSZ02 -0.9012334  0.0087262  -103.278  < 2e-16 ***
ORIGIN_SZSBSZ03  0.8311038  0.0055422   149.958  < 2e-16 ***
ORIGIN_SZSBSZ04  0.4044170  0.0062047    65.179  < 2e-16 ***
ORIGIN_SZSBSZ05 -0.2661845  0.0074162   -35.892  < 2e-16 ***
ORIGIN_SZSBSZ06 -0.9023075  0.0175046   -51.547  < 2e-16 ***
ORIGIN_SZSBSZ07  0.0505870  0.0131317     3.852 0.000117 ***
ORIGIN_SZSBSZ08 -1.1158011  0.0145416   -76.732  < 2e-16 ***
ORIGIN_SZSBSZ09 -0.9682835  0.0095396  -101.501  < 2e-16 ***
ORIGIN_SZSESZ02  1.1452735  0.0047810   239.548  < 2e-16 ***
ORIGIN_SZSESZ03  1.2815277  0.0045677   280.564  < 2e-16 ***
ORIGIN_SZSESZ04  0.8085857  0.0052756   153.269  < 2e-16 ***
ORIGIN_SZSESZ05 -0.2329413  0.0063113   -36.909  < 2e-16 ***
ORIGIN_SZSESZ06  1.0576879  0.0049909   211.925  < 2e-16 ***
ORIGIN_SZSESZ07 -2.3165908  0.0196831  -117.695  < 2e-16 ***
ORIGIN_SZSGSZ01 -0.6606350  0.0088079   -75.005  < 2e-16 ***
ORIGIN_SZSGSZ02 -1.3638984  0.0104040  -131.094  < 2e-16 ***
ORIGIN_SZSGSZ03  0.1152591  0.0054649    21.091  < 2e-16 ***
ORIGIN_SZSGSZ04  0.2954067  0.0050865    58.077  < 2e-16 ***
ORIGIN_SZSGSZ05 -2.0792678  0.0109882  -189.227  < 2e-16 ***
ORIGIN_SZSGSZ06  0.4563227  0.0048880    93.356  < 2e-16 ***
ORIGIN_SZSGSZ07 -0.8955254  0.0067100  -133.461  < 2e-16 ***
ORIGIN_SZSKSZ01 -0.3184402  0.0093032   -34.229  < 2e-16 ***
ORIGIN_SZSKSZ02  1.1160484  0.0063851   174.790  < 2e-16 ***
ORIGIN_SZSKSZ03 -0.2566692  0.0086021   -29.838  < 2e-16 ***
ORIGIN_SZSKSZ04 -1.5781827  0.0279394   -56.486  < 2e-16 ***
ORIGIN_SZSKSZ05 -0.2724361  0.0163597   -16.653  < 2e-16 ***
ORIGIN_SZSLSZ01 -2.4458625  0.0330301   -74.050  < 2e-16 ***
ORIGIN_SZSLSZ04 -0.0987076  0.0079626   -12.396  < 2e-16 ***
ORIGIN_SZSRSZ01 -2.2584977  0.0176647  -127.854  < 2e-16 ***
ORIGIN_SZTHSZ01 -2.5878524  0.0489998   -52.814  < 2e-16 ***
ORIGIN_SZTHSZ03 -0.8101746  0.0226814   -35.720  < 2e-16 ***
ORIGIN_SZTHSZ04 -2.4186655  0.0288663   -83.789  < 2e-16 ***
ORIGIN_SZTHSZ06 -1.7080541  0.0186353   -91.657  < 2e-16 ***
ORIGIN_SZTMSZ01 -0.2193476  0.0061823   -35.480  < 2e-16 ***
ORIGIN_SZTMSZ02  1.7772464  0.0043394   409.558  < 2e-16 ***
ORIGIN_SZTMSZ03  1.0051343  0.0046055   218.249  < 2e-16 ***
ORIGIN_SZTMSZ04  0.1642370  0.0055078    29.819  < 2e-16 ***
ORIGIN_SZTMSZ05 -1.2878706  0.0114828  -112.157  < 2e-16 ***
ORIGIN_SZTNSZ01 -1.7163504  0.0131268  -130.751  < 2e-16 ***
ORIGIN_SZTNSZ02 -1.6508988  0.0103851  -158.968  < 2e-16 ***
ORIGIN_SZTNSZ03 -2.1545577  0.0137947  -156.187  < 2e-16 ***
ORIGIN_SZTNSZ04 -0.3949120  0.0078496   -50.310  < 2e-16 ***
ORIGIN_SZTPSZ01 -0.8058100  0.0069916  -115.253  < 2e-16 ***
ORIGIN_SZTPSZ02  0.5369060  0.0047272   113.577  < 2e-16 ***
ORIGIN_SZTPSZ03 -0.7779333  0.0064278  -121.027  < 2e-16 ***
ORIGIN_SZTPSZ04 -0.8153581  0.0061387  -132.823  < 2e-16 ***
ORIGIN_SZTPSZ05 -0.5073676  0.0067771   -74.865  < 2e-16 ***
ORIGIN_SZTPSZ06  0.0847301  0.0065717    12.893  < 2e-16 ***
ORIGIN_SZTPSZ07 -0.5839519  0.0066148   -88.280  < 2e-16 ***
ORIGIN_SZTPSZ08 -1.0577941  0.0098480  -107.412  < 2e-16 ***
ORIGIN_SZTPSZ09 -0.9067707  0.0071367  -127.057  < 2e-16 ***
ORIGIN_SZTPSZ10 -1.1362091  0.0080905  -140.438  < 2e-16 ***
ORIGIN_SZTPSZ11 -0.2374621  0.0059472   -39.928  < 2e-16 ***
ORIGIN_SZTPSZ12 -0.8028874  0.0069663  -115.253  < 2e-16 ***
ORIGIN_SZTSSZ01 -2.7809271  0.0482843   -57.595  < 2e-16 ***
ORIGIN_SZTSSZ02  0.0425804  0.0105088     4.052 5.08e-05 ***
ORIGIN_SZTSSZ03  0.1142369  0.0109412    10.441  < 2e-16 ***
ORIGIN_SZTSSZ04 -0.6186261  0.0116324   -53.181  < 2e-16 ***
ORIGIN_SZTSSZ05 -1.0846732  0.0173555   -62.497  < 2e-16 ***
ORIGIN_SZTSSZ06  0.3980173  0.0198100    20.092  < 2e-16 ***
ORIGIN_SZWCSZ01  1.3545143  0.0092002   147.227  < 2e-16 ***
ORIGIN_SZWCSZ02 -2.9863278  0.0330906   -90.247  < 2e-16 ***
ORIGIN_SZWCSZ03 -5.0504916  0.1241385   -40.684  < 2e-16 ***
ORIGIN_SZWDSZ01  1.5238429  0.0049404   308.448  < 2e-16 ***
ORIGIN_SZWDSZ02  0.2832576  0.0056218    50.386  < 2e-16 ***
ORIGIN_SZWDSZ03  1.3702524  0.0053266   257.245  < 2e-16 ***
ORIGIN_SZWDSZ04  1.0248225  0.0059272   172.903  < 2e-16 ***
ORIGIN_SZWDSZ05  0.2356778  0.0060587    38.899  < 2e-16 ***
ORIGIN_SZWDSZ06  0.3146925  0.0059919    52.520  < 2e-16 ***
ORIGIN_SZWDSZ07 -1.4971897  0.0091243  -164.088  < 2e-16 ***
ORIGIN_SZWDSZ08 -0.8894079  0.0087414  -101.747  < 2e-16 ***
ORIGIN_SZWDSZ09  1.4437633  0.0053160   271.590  < 2e-16 ***
ORIGIN_SZYSSZ01 -0.2519398  0.0064443   -39.095  < 2e-16 ***
ORIGIN_SZYSSZ02  0.8726785  0.0057658   151.354  < 2e-16 ***
ORIGIN_SZYSSZ03  1.7868139  0.0050674   352.611  < 2e-16 ***
ORIGIN_SZYSSZ04  0.8418040  0.0051738   162.704  < 2e-16 ***
ORIGIN_SZYSSZ05  0.4292096  0.0062520    68.652  < 2e-16 ***
ORIGIN_SZYSSZ06 -0.7459961  0.0119123   -62.624  < 2e-16 ***
ORIGIN_SZYSSZ07 -0.8422281  0.0144559   -58.262  < 2e-16 ***
ORIGIN_SZYSSZ08  0.1829428  0.0067885    26.949  < 2e-16 ***
ORIGIN_SZYSSZ09  1.1159712  0.0050760   219.853  < 2e-16 ***
DESTIN_SZAMSZ02  0.0694567  0.0045966    15.111  < 2e-16 ***
DESTIN_SZAMSZ03  0.0760100  0.0044639    17.028  < 2e-16 ***
DESTIN_SZAMSZ04 -1.1306391  0.0064373  -175.639  < 2e-16 ***
DESTIN_SZAMSZ05 -1.0751133  0.0065164  -164.985  < 2e-16 ***
DESTIN_SZAMSZ06 -0.9624298  0.0065937  -145.962  < 2e-16 ***
DESTIN_SZAMSZ07 -1.5060319  0.0097616  -154.281  < 2e-16 ***
DESTIN_SZAMSZ08 -0.4813202  0.0069794   -68.963  < 2e-16 ***
DESTIN_SZAMSZ09 -1.0220675  0.0066313  -154.129  < 2e-16 ***
DESTIN_SZAMSZ10  0.1235142  0.0047044    26.255  < 2e-16 ***
DESTIN_SZAMSZ11 -0.8917993  0.0088519  -100.746  < 2e-16 ***
DESTIN_SZAMSZ12  0.0195208  0.0051704     3.775 0.000160 ***
DESTIN_SZBDSZ01  0.9736349  0.0042757   227.713  < 2e-16 ***
DESTIN_SZBDSZ02 -0.1969470  0.0055284   -35.625  < 2e-16 ***
DESTIN_SZBDSZ03  0.1266471  0.0050786    24.938  < 2e-16 ***
DESTIN_SZBDSZ04  1.1608485  0.0041956   276.684  < 2e-16 ***
DESTIN_SZBDSZ05  0.9293840  0.0044412   209.265  < 2e-16 ***
DESTIN_SZBDSZ06  0.4090567  0.0050300    81.323  < 2e-16 ***
DESTIN_SZBDSZ07 -0.8171478  0.0098945   -82.586  < 2e-16 ***
DESTIN_SZBDSZ08 -1.5895287  0.0111632  -142.391  < 2e-16 ***
DESTIN_SZBKSZ01 -1.3793311  0.0072145  -191.189  < 2e-16 ***
DESTIN_SZBKSZ02 -0.5253670  0.0061879   -84.903  < 2e-16 ***
DESTIN_SZBKSZ03 -1.0095362  0.0065426  -154.301  < 2e-16 ***
DESTIN_SZBKSZ04 -0.5662858  0.0056453  -100.311  < 2e-16 ***
DESTIN_SZBKSZ05 -0.9406607  0.0070597  -133.244  < 2e-16 ***
DESTIN_SZBKSZ06 -1.3129276  0.0067414  -194.755  < 2e-16 ***
DESTIN_SZBKSZ07  0.0120605  0.0049284     2.447 0.014400 *  
DESTIN_SZBKSZ08 -1.3658471  0.0075109  -181.849  < 2e-16 ***
DESTIN_SZBKSZ09 -0.1771310  0.0055645   -31.832  < 2e-16 ***
DESTIN_SZBLSZ01 -0.8175223  0.0075645  -108.074  < 2e-16 ***
DESTIN_SZBLSZ02  0.1631280  0.0071753    22.735  < 2e-16 ***
DESTIN_SZBLSZ03  1.2598494  0.0081706   154.194  < 2e-16 ***
DESTIN_SZBLSZ04 -0.5642975  0.0137827   -40.943  < 2e-16 ***
DESTIN_SZBMSZ01  0.6921844  0.0054211   127.684  < 2e-16 ***
DESTIN_SZBMSZ02 -0.1209392  0.0055362   -21.845  < 2e-16 ***
DESTIN_SZBMSZ03 -0.2373881  0.0062427   -38.027  < 2e-16 ***
DESTIN_SZBMSZ04 -0.0407117  0.0058001    -7.019 2.23e-12 ***
DESTIN_SZBMSZ05 -0.2363309  0.0075967   -31.110  < 2e-16 ***
DESTIN_SZBMSZ06 -1.1930710  0.0134761   -88.532  < 2e-16 ***
DESTIN_SZBMSZ07  0.4625103  0.0051864    89.178  < 2e-16 ***
DESTIN_SZBMSZ08 -0.8604731  0.0069899  -123.102  < 2e-16 ***
DESTIN_SZBMSZ09 -2.1290239  0.0154841  -137.498  < 2e-16 ***
DESTIN_SZBMSZ10 -1.4617153  0.0094014  -155.478  < 2e-16 ***
DESTIN_SZBMSZ11 -1.3234050  0.0085506  -154.773  < 2e-16 ***
DESTIN_SZBMSZ12 -0.8399230  0.0085361   -98.397  < 2e-16 ***
DESTIN_SZBMSZ13  0.1366529  0.0059697    22.891  < 2e-16 ***
DESTIN_SZBMSZ14 -1.0491968  0.0083021  -126.378  < 2e-16 ***
DESTIN_SZBMSZ15 -0.6726684  0.0076276   -88.189  < 2e-16 ***
DESTIN_SZBMSZ16 -1.4011734  0.0116569  -120.201  < 2e-16 ***
DESTIN_SZBMSZ17 -1.5682752  0.0167333   -93.722  < 2e-16 ***
DESTIN_SZBPSZ01 -1.1120017  0.0063197  -175.959  < 2e-16 ***
DESTIN_SZBPSZ02 -2.0833466  0.0091139  -228.590  < 2e-16 ***
DESTIN_SZBPSZ03 -1.6937265  0.0087437  -193.709  < 2e-16 ***
DESTIN_SZBPSZ04 -0.7964999  0.0066129  -120.447  < 2e-16 ***
DESTIN_SZBPSZ05  0.2109118  0.0048815    43.206  < 2e-16 ***
DESTIN_SZBPSZ06 -1.1808365  0.0083657  -141.152  < 2e-16 ***
DESTIN_SZBPSZ07 -0.2077428  0.0084543   -24.572  < 2e-16 ***
DESTIN_SZBSSZ01  0.3164175  0.0050682    62.431  < 2e-16 ***
DESTIN_SZBSSZ02 -0.4852688  0.0057001   -85.134  < 2e-16 ***
DESTIN_SZBSSZ03  0.4130432  0.0043061    95.921  < 2e-16 ***
DESTIN_SZBTSZ01  0.6215095  0.0048914   127.061  < 2e-16 ***
DESTIN_SZBTSZ02 -0.0145076  0.0071799    -2.021 0.043324 *  
DESTIN_SZBTSZ03  0.4919981  0.0058498    84.105  < 2e-16 ***
DESTIN_SZBTSZ04 -0.6957555  0.0114078   -60.989  < 2e-16 ***
DESTIN_SZBTSZ05  0.3329814  0.0073568    45.262  < 2e-16 ***
DESTIN_SZBTSZ06 -0.1333295  0.0073965   -18.026  < 2e-16 ***
DESTIN_SZBTSZ07 -1.4449581  0.0113186  -127.663  < 2e-16 ***
DESTIN_SZBTSZ08 -0.7079056  0.0103797   -68.201  < 2e-16 ***
DESTIN_SZCBSZ01 -5.7344725  0.3162767   -18.131  < 2e-16 ***
DESTIN_SZCCSZ01 -0.0009541  0.0083381    -0.114 0.908900    
DESTIN_SZCHSZ01 -0.2083016  0.0099054   -21.029  < 2e-16 ***
DESTIN_SZCHSZ02  0.5369606  0.0057531    93.334  < 2e-16 ***
DESTIN_SZCHSZ03  2.5530638  0.0043945   580.971  < 2e-16 ***
DESTIN_SZCKSZ01 -0.5725975  0.0056507  -101.333  < 2e-16 ***
DESTIN_SZCKSZ02 -1.1181852  0.0063287  -176.685  < 2e-16 ***
DESTIN_SZCKSZ03  0.1156680  0.0049440    23.396  < 2e-16 ***
DESTIN_SZCKSZ04 -0.8647725  0.0071003  -121.794  < 2e-16 ***
DESTIN_SZCKSZ05 -1.1641791  0.0076248  -152.684  < 2e-16 ***
DESTIN_SZCKSZ06 -0.4397612  0.0073040   -60.208  < 2e-16 ***
DESTIN_SZCLSZ01  0.1930552  0.0053752    35.916  < 2e-16 ***
DESTIN_SZCLSZ02 -2.0436501  0.0136039  -150.225  < 2e-16 ***
DESTIN_SZCLSZ03 -0.9338571  0.0082908  -112.638  < 2e-16 ***
DESTIN_SZCLSZ04  0.0532041  0.0053276     9.987  < 2e-16 ***
DESTIN_SZCLSZ05 -1.0782781  0.0088184  -122.276  < 2e-16 ***
DESTIN_SZCLSZ06  0.4068171  0.0049068    82.910  < 2e-16 ***
DESTIN_SZCLSZ07 -0.3579507  0.0060289   -59.373  < 2e-16 ***
DESTIN_SZCLSZ08 -0.2487993  0.0066588   -37.364  < 2e-16 ***
DESTIN_SZCLSZ09  0.1611080  0.0071178    22.635  < 2e-16 ***
DESTIN_SZDTSZ02 -1.7308348  0.0349466   -49.528  < 2e-16 ***
DESTIN_SZDTSZ03 -0.5994253  0.0146230   -40.992  < 2e-16 ***
DESTIN_SZDTSZ13 -1.3685031  0.0162803   -84.059  < 2e-16 ***
DESTIN_SZGLSZ01 -0.0910001  0.0055275   -16.463  < 2e-16 ***
DESTIN_SZGLSZ02 -0.0692224  0.0052840   -13.100  < 2e-16 ***
DESTIN_SZGLSZ03  0.6493421  0.0043446   149.459  < 2e-16 ***
DESTIN_SZGLSZ04  0.9327947  0.0043674   213.583  < 2e-16 ***
DESTIN_SZGLSZ05  0.8161728  0.0043625   187.087  < 2e-16 ***
DESTIN_SZHGSZ01  0.0658625  0.0042516    15.491  < 2e-16 ***
DESTIN_SZHGSZ02 -0.8134329  0.0056721  -143.409  < 2e-16 ***
DESTIN_SZHGSZ03 -1.3546132  0.0066257  -204.448  < 2e-16 ***
DESTIN_SZHGSZ04 -0.4500588  0.0048448   -92.895  < 2e-16 ***
DESTIN_SZHGSZ05 -0.5026431  0.0050996   -98.566  < 2e-16 ***
DESTIN_SZHGSZ06 -0.8673686  0.0059530  -145.704  < 2e-16 ***
DESTIN_SZHGSZ07  0.0560490  0.0047702    11.750  < 2e-16 ***
DESTIN_SZHGSZ08 -0.0443189  0.0052599    -8.426  < 2e-16 ***
DESTIN_SZHGSZ09 -0.0126355  0.0054966    -2.299 0.021518 *  
DESTIN_SZHGSZ10 -3.5821793  0.0263281  -136.059  < 2e-16 ***
DESTIN_SZJESZ01 -0.3704281  0.0056684   -65.350  < 2e-16 ***
DESTIN_SZJESZ02 -0.7369159  0.0058686  -125.570  < 2e-16 ***
DESTIN_SZJESZ03 -0.8985484  0.0063627  -141.222  < 2e-16 ***
DESTIN_SZJESZ04 -1.0511995  0.0073996  -142.061  < 2e-16 ***
DESTIN_SZJESZ05 -1.5324974  0.0102612  -149.349  < 2e-16 ***
DESTIN_SZJESZ06  0.3105267  0.0048241    64.370  < 2e-16 ***
DESTIN_SZJESZ07 -1.3234483  0.0085497  -154.795  < 2e-16 ***
DESTIN_SZJESZ08 -0.6559742  0.0083174   -78.867  < 2e-16 ***
DESTIN_SZJESZ09  0.2663752  0.0063370    42.035  < 2e-16 ***
DESTIN_SZJESZ10  0.8529026  0.0076067   112.126  < 2e-16 ***
DESTIN_SZJESZ11  0.5559641  0.0074629    74.497  < 2e-16 ***
DESTIN_SZJWSZ01 -0.9790971  0.0071830  -136.308  < 2e-16 ***
DESTIN_SZJWSZ02 -0.8746590  0.0060179  -145.342  < 2e-16 ***
DESTIN_SZJWSZ03  0.5689062  0.0049105   115.855  < 2e-16 ***
DESTIN_SZJWSZ04  0.4520963  0.0050302    89.876  < 2e-16 ***
DESTIN_SZJWSZ05 -1.0249671  0.0067371  -152.137  < 2e-16 ***
DESTIN_SZJWSZ06 -0.7451483  0.0062189  -119.819  < 2e-16 ***
DESTIN_SZJWSZ07 -2.8453099  0.0287335   -99.024  < 2e-16 ***
DESTIN_SZJWSZ08 -0.3372309  0.0058003   -58.141  < 2e-16 ***
DESTIN_SZJWSZ09  1.0505330  0.0045908   228.832  < 2e-16 ***
DESTIN_SZKLSZ01 -0.2334836  0.0057970   -40.277  < 2e-16 ***
DESTIN_SZKLSZ02 -0.5416148  0.0061432   -88.164  < 2e-16 ***
DESTIN_SZKLSZ03 -0.8026495  0.0068745  -116.757  < 2e-16 ***
DESTIN_SZKLSZ04 -1.2918594  0.0090197  -143.227  < 2e-16 ***
DESTIN_SZKLSZ05 -0.4069101  0.0087812   -46.339  < 2e-16 ***
DESTIN_SZKLSZ06 -2.5333101  0.0363215   -69.747  < 2e-16 ***
DESTIN_SZKLSZ07 -0.6623343  0.0070761   -93.601  < 2e-16 ***
DESTIN_SZKLSZ08 -0.1408205  0.0054965   -25.620  < 2e-16 ***
DESTIN_SZLKSZ01 -1.2639235  0.0208254   -60.691  < 2e-16 ***
DESTIN_SZMDSZ01 -1.5655800  0.0202787   -77.203  < 2e-16 ***
DESTIN_SZMDSZ02 -0.9767682  0.0114687   -85.168  < 2e-16 ***
DESTIN_SZMDSZ03 -3.3328109  0.0254294  -131.061  < 2e-16 ***
DESTIN_SZMPSZ01 -0.4552859  0.0080666   -56.441  < 2e-16 ***
DESTIN_SZMPSZ02 -0.5386560  0.0064620   -83.358  < 2e-16 ***
DESTIN_SZMPSZ03  0.4952000  0.0052295    94.694  < 2e-16 ***
DESTIN_SZMUSZ02 -1.4434175  0.0202509   -71.277  < 2e-16 ***
DESTIN_SZNTSZ01 -2.9194067  0.0449654   -64.926  < 2e-16 ***
DESTIN_SZNTSZ02 -1.3780179  0.0112867  -122.092  < 2e-16 ***
DESTIN_SZNTSZ03 -0.5044699  0.0080449   -62.707  < 2e-16 ***
DESTIN_SZNTSZ05 -2.0017134  0.0258750   -77.361  < 2e-16 ***
DESTIN_SZNTSZ06 -3.8120537  0.0434271   -87.781  < 2e-16 ***
DESTIN_SZNVSZ01 -0.1071506  0.0051026   -20.999  < 2e-16 ***
DESTIN_SZNVSZ02 -0.0274710  0.0057611    -4.768 1.86e-06 ***
DESTIN_SZNVSZ03  0.1076352  0.0057909    18.587  < 2e-16 ***
DESTIN_SZNVSZ04 -1.2087250  0.0110438  -109.448  < 2e-16 ***
DESTIN_SZNVSZ05 -1.0058290  0.0092167  -109.131  < 2e-16 ***
DESTIN_SZPGSZ01 -1.2029931  0.0163170   -73.726  < 2e-16 ***
DESTIN_SZPGSZ02 -1.2878671  0.0074139  -173.709  < 2e-16 ***
DESTIN_SZPGSZ03 -0.1520894  0.0048629   -31.275  < 2e-16 ***
DESTIN_SZPGSZ04 -0.1985959  0.0050374   -39.424  < 2e-16 ***
DESTIN_SZPGSZ05 -1.5290983  0.0082617  -185.083  < 2e-16 ***
DESTIN_SZPLSZ01 -0.3567934  0.0074298   -48.022  < 2e-16 ***
DESTIN_SZPLSZ02 -1.7114351  0.0134462  -127.280  < 2e-16 ***
DESTIN_SZPLSZ03 -0.3241427  0.0098895   -32.776  < 2e-16 ***
DESTIN_SZPLSZ04 -1.7117196  0.0119003  -143.838  < 2e-16 ***
DESTIN_SZPLSZ05 -0.5086379  0.0120051   -42.368  < 2e-16 ***
DESTIN_SZPNSZ01  0.2026781  0.0068977    29.383  < 2e-16 ***
DESTIN_SZPNSZ02  0.8313754  0.0078544   105.848  < 2e-16 ***
DESTIN_SZPNSZ03 -0.4041254  0.0086586   -46.673  < 2e-16 ***
DESTIN_SZPNSZ04  1.5814539  0.0093641   168.885  < 2e-16 ***
DESTIN_SZPNSZ05  1.1823430  0.0129843    91.059  < 2e-16 ***
DESTIN_SZPRSZ01 -1.1057553  0.0088197  -125.374  < 2e-16 ***
DESTIN_SZPRSZ02  0.0895099  0.0056308    15.897  < 2e-16 ***
DESTIN_SZPRSZ03  0.6921925  0.0043977   157.397  < 2e-16 ***
DESTIN_SZPRSZ04 -0.2848336  0.0084725   -33.619  < 2e-16 ***
DESTIN_SZPRSZ05  0.1744480  0.0053553    32.575  < 2e-16 ***
DESTIN_SZPRSZ06  0.4279206  0.0058735    72.856  < 2e-16 ***
DESTIN_SZPRSZ07 -1.5123108  0.0124303  -121.664  < 2e-16 ***
DESTIN_SZPRSZ08 -0.5650226  0.0068530   -82.449  < 2e-16 ***
DESTIN_SZQTSZ01 -0.5952360  0.0090505   -65.769  < 2e-16 ***
DESTIN_SZQTSZ02 -0.7728170  0.0078910   -97.937  < 2e-16 ***
DESTIN_SZQTSZ03 -0.5066812  0.0073996   -68.474  < 2e-16 ***
DESTIN_SZQTSZ04 -0.6398414  0.0075411   -84.847  < 2e-16 ***
DESTIN_SZQTSZ05 -0.4354527  0.0069345   -62.795  < 2e-16 ***
DESTIN_SZQTSZ06 -0.6597391  0.0071919   -91.733  < 2e-16 ***
DESTIN_SZQTSZ07 -0.9392696  0.0112518   -83.477  < 2e-16 ***
DESTIN_SZQTSZ08  0.4617774  0.0057011    80.998  < 2e-16 ***
DESTIN_SZQTSZ09 -0.3174497  0.0065890   -48.178  < 2e-16 ***
DESTIN_SZQTSZ10  0.1993449  0.0059923    33.267  < 2e-16 ***
DESTIN_SZQTSZ11  0.2551535  0.0061885    41.230  < 2e-16 ***
DESTIN_SZQTSZ12 -0.1662603  0.0086701   -19.176  < 2e-16 ***
DESTIN_SZQTSZ13  0.5500978  0.0063091    87.192  < 2e-16 ***
DESTIN_SZQTSZ14  0.5364435  0.0070157    76.463  < 2e-16 ***
DESTIN_SZQTSZ15  1.3611043  0.0081643   166.715  < 2e-16 ***
DESTIN_SZRCSZ01 -0.1034049  0.0076769   -13.470  < 2e-16 ***
DESTIN_SZRCSZ06 -1.0633902  0.0189846   -56.013  < 2e-16 ***
DESTIN_SZRVSZ01 -1.5486221  0.0165272   -93.701  < 2e-16 ***
DESTIN_SZRVSZ02 -2.4092611  0.0326906   -73.699  < 2e-16 ***
DESTIN_SZRVSZ03 -1.5172079  0.0139258  -108.950  < 2e-16 ***
DESTIN_SZRVSZ04 -1.1663615  0.0157430   -74.088  < 2e-16 ***
DESTIN_SZRVSZ05 -2.2404292  0.0281339   -79.634  < 2e-16 ***
DESTIN_SZSBSZ01 -1.3783780  0.0096022  -143.549  < 2e-16 ***
DESTIN_SZSBSZ02 -1.4445213  0.0081630  -176.959  < 2e-16 ***
DESTIN_SZSBSZ03  0.5149906  0.0051663    99.683  < 2e-16 ***
DESTIN_SZSBSZ04  0.2389086  0.0060765    39.317  < 2e-16 ***
DESTIN_SZSBSZ05 -1.2737442  0.0082818  -153.801  < 2e-16 ***
DESTIN_SZSBSZ06 -1.8683520  0.0227277   -82.206  < 2e-16 ***
DESTIN_SZSBSZ07 -0.5993154  0.0184895   -32.414  < 2e-16 ***
DESTIN_SZSBSZ08  0.8156302  0.0059840   136.302  < 2e-16 ***
DESTIN_SZSBSZ09  0.0900611  0.0057054    15.785  < 2e-16 ***
DESTIN_SZSESZ02 -0.6397704  0.0052491  -121.882  < 2e-16 ***
DESTIN_SZSESZ03  0.1714103  0.0042357    40.468  < 2e-16 ***
DESTIN_SZSESZ04 -1.0596175  0.0059865  -177.002  < 2e-16 ***
DESTIN_SZSESZ05 -0.8071891  0.0051229  -157.566  < 2e-16 ***
DESTIN_SZSESZ06 -0.5580934  0.0066216   -84.284  < 2e-16 ***
DESTIN_SZSESZ07 -3.1448863  0.0227788  -138.062  < 2e-16 ***
DESTIN_SZSGSZ01 -0.1795225  0.0060127   -29.857  < 2e-16 ***
DESTIN_SZSGSZ02 -0.2986570  0.0053561   -55.760  < 2e-16 ***
DESTIN_SZSGSZ03 -0.4074671  0.0050609   -80.513  < 2e-16 ***
DESTIN_SZSGSZ04 -0.1505164  0.0050931   -29.553  < 2e-16 ***
DESTIN_SZSGSZ05 -1.9908372  0.0101448  -196.242  < 2e-16 ***
DESTIN_SZSGSZ06  0.6715268  0.0041161   163.148  < 2e-16 ***
DESTIN_SZSGSZ07 -0.4494757  0.0055319   -81.252  < 2e-16 ***
DESTIN_SZSISZ01 -0.5517983  0.0261860   -21.072  < 2e-16 ***
DESTIN_SZSKSZ01 -0.4749154  0.0079257   -59.921  < 2e-16 ***
DESTIN_SZSKSZ02  0.9400302  0.0057218   164.290  < 2e-16 ***
DESTIN_SZSKSZ03 -0.2800377  0.0066081   -42.378  < 2e-16 ***
DESTIN_SZSKSZ04 -1.2570212  0.0145351   -86.482  < 2e-16 ***
DESTIN_SZSKSZ05 -0.2600474  0.0112800   -23.054  < 2e-16 ***
DESTIN_SZSLSZ01 -0.7775604  0.0085818   -90.606  < 2e-16 ***
DESTIN_SZSLSZ04 -0.8586515  0.0073142  -117.396  < 2e-16 ***
DESTIN_SZSRSZ01 -1.1370887  0.0142148   -79.993  < 2e-16 ***
DESTIN_SZTHSZ01 -4.3259988  0.0368554  -117.378  < 2e-16 ***
DESTIN_SZTHSZ03 -2.6632914  0.0252720  -105.385  < 2e-16 ***
DESTIN_SZTHSZ04 -3.1000906  0.0216372  -143.276  < 2e-16 ***
DESTIN_SZTHSZ06 -2.5952642  0.0156340  -166.001  < 2e-16 ***
DESTIN_SZTMSZ01 -0.2092828  0.0059257   -35.318  < 2e-16 ***
DESTIN_SZTMSZ02  1.8238139  0.0039155   465.798  < 2e-16 ***
DESTIN_SZTMSZ03  0.8518259  0.0043636   195.210  < 2e-16 ***
DESTIN_SZTMSZ04  1.0222812  0.0043466   235.191  < 2e-16 ***
DESTIN_SZTMSZ05  0.6323777  0.0060058   105.294  < 2e-16 ***
DESTIN_SZTNSZ01 -0.3336078  0.0074388   -44.847  < 2e-16 ***
DESTIN_SZTNSZ02 -1.0820469  0.0101689  -106.408  < 2e-16 ***
DESTIN_SZTNSZ03 -1.4186505  0.0119906  -118.313  < 2e-16 ***
DESTIN_SZTNSZ04 -0.3058199  0.0074743   -40.916  < 2e-16 ***
DESTIN_SZTPSZ01 -0.4872299  0.0061571   -79.133  < 2e-16 ***
DESTIN_SZTPSZ02  0.7158441  0.0041312   173.278  < 2e-16 ***
DESTIN_SZTPSZ03 -0.4314229  0.0059917   -72.004  < 2e-16 ***
DESTIN_SZTPSZ04 -1.5898245  0.0076083  -208.959  < 2e-16 ***
DESTIN_SZTPSZ05 -1.0445550  0.0062363  -167.497  < 2e-16 ***
DESTIN_SZTPSZ06 -0.4319582  0.0070100   -61.621  < 2e-16 ***
DESTIN_SZTPSZ07 -2.1602303  0.0120352  -179.493  < 2e-16 ***
DESTIN_SZTPSZ08 -1.1920493  0.0093083  -128.063  < 2e-16 ***
DESTIN_SZTPSZ09 -0.2022481  0.0071137   -28.431  < 2e-16 ***
DESTIN_SZTPSZ10 -1.2464793  0.0090124  -138.308  < 2e-16 ***
DESTIN_SZTPSZ11 -0.0808445  0.0056019   -14.432  < 2e-16 ***
DESTIN_SZTPSZ12 -0.6784376  0.0066340  -102.267  < 2e-16 ***
DESTIN_SZTSSZ01 -1.5845062  0.0222086   -71.346  < 2e-16 ***
DESTIN_SZTSSZ02 -0.1886010  0.0146338   -12.888  < 2e-16 ***
DESTIN_SZTSSZ03  0.6525526  0.0092450    70.585  < 2e-16 ***
DESTIN_SZTSSZ04  0.5285464  0.0100182    52.759  < 2e-16 ***
DESTIN_SZTSSZ05  1.4670106  0.0104357   140.577  < 2e-16 ***
DESTIN_SZTSSZ06  2.5043588  0.0167444   149.564  < 2e-16 ***
DESTIN_SZWCSZ01  1.9787931  0.0054306   364.375  < 2e-16 ***
DESTIN_SZWCSZ02 -2.2593108  0.0127916  -176.624  < 2e-16 ***
DESTIN_SZWCSZ03 -3.1897655  0.0326927   -97.568  < 2e-16 ***
DESTIN_SZWDSZ01  1.0476108  0.0044629   234.738  < 2e-16 ***
DESTIN_SZWDSZ02 -1.3176990  0.0065894  -199.973  < 2e-16 ***
DESTIN_SZWDSZ03  0.3432057  0.0052496    65.377  < 2e-16 ***
DESTIN_SZWDSZ04 -0.7895927  0.0073392  -107.586  < 2e-16 ***
DESTIN_SZWDSZ05 -0.8751665  0.0072946  -119.975  < 2e-16 ***
DESTIN_SZWDSZ06 -0.2106221  0.0053027   -39.720  < 2e-16 ***
DESTIN_SZWDSZ07 -1.6050834  0.0071754  -223.692  < 2e-16 ***
DESTIN_SZWDSZ08 -0.5124717  0.0069223   -74.032  < 2e-16 ***
DESTIN_SZWDSZ09  0.3813542  0.0054697    69.721  < 2e-16 ***
DESTIN_SZYSSZ01  0.0853753  0.0046572    18.332  < 2e-16 ***
DESTIN_SZYSSZ02 -0.3227172  0.0057351   -56.271  < 2e-16 ***
DESTIN_SZYSSZ03 -0.4151283  0.0066299   -62.615  < 2e-16 ***
DESTIN_SZYSSZ04 -0.4637327  0.0058206   -79.671  < 2e-16 ***
DESTIN_SZYSSZ05 -1.5888242  0.0111001  -143.136  < 2e-16 ***
DESTIN_SZYSSZ06 -1.4606209  0.0107759  -135.545  < 2e-16 ***
DESTIN_SZYSSZ07 -0.7839065  0.0144357   -54.304  < 2e-16 ***
DESTIN_SZYSSZ08  0.6265412  0.0045504   137.691  < 2e-16 ***
DESTIN_SZYSSZ09  0.1520067  0.0048092    31.607  < 2e-16 ***
log(dist)       -1.8468315  0.0004608 -4008.033  < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 47094011  on 14470  degrees of freedom
Residual deviance: 10420261  on 13912  degrees of freedom
AIC: 10510518

Number of Fisher Scoring iterations: 7

Again, let’s check the R-square values of doubly constrained SIM model this time.

CalcRSquared(dbcSIM$data$TRIPS, dbcSIM$fitted.values)
[1] 0.7001882

Notice that there is a relatively greater improvement in the R-sqauared value than destination constrained SIM.

9.7 Model Comparison

Another useful model performance measure for continuous dependent variable is Root Mean Squared Error. In this sub-section, you will learn how to use compare_performance() of performance package.

First of all, let us create a list called model_list by using the code chunk below.

model_list <- list(unconstrained=uncSIM,
                   originConstrained=orcSIM,
                   destinationConstrained=decSIM,
                   doublyConstrained=dbcSIM)

Next, we will compute the RMSE of all the models in model_list file by using the code chunk below.

compare_performance(model_list,
                    metrics = "RMSE")
# Comparison of Model Performance Indices

Name                   | Model |     RMSE
-----------------------------------------
unconstrained          |   glm | 3178.342
originConstrained      |   glm | 2697.969
destinationConstrained |   glm | 2434.018
doublyConstrained      |   glm | 1906.694

The print above reveals that doubly constrained SIM is the best model among all the four SIMs because it has the smallest RMSE value of 1906.694.

9.8 Visualising fitted values

Firstly we will extract the fitted values from each model by using the code chunk below.

df_unc <- as.data.frame(uncSIM$fitted.values) %>%
  round(digits = 0)

Next, we will join the values to SIM_data data frame.

SIM_data <- SIM_data %>%
  cbind(df_unc) %>%
  rename(uncTRIPS = "uncSIM$fitted.values")

We repeat the same step by for Origin Constrained SIM (i.e. orcSIM)

df_orc <- as.data.frame(orcSIM$fitted.values) %>%
  round(digits = 0)
SIM_data <- SIM_data %>%
  cbind(df_orc) %>%
  rename(orcTRIPS = "orcSIM$fitted.values")

We repeat the same step by for Destination Constrained SIM (i.e. decSIM)

df_dec <- as.data.frame(decSIM$fitted.values) %>%
  round(digits = 0)
SIM_data <- SIM_data %>%
  cbind(df_dec) %>%
  rename(decTRIPS = "decSIM$fitted.values")

We repeat the same step by for Doubly Constrained SIM (i.e. dbcSIM)

df_dbc <- as.data.frame(dbcSIM$fitted.values) %>%
  round(digits = 0)
SIM_data <- SIM_data %>%
  cbind(df_dbc) %>%
  rename(dbcTRIPS = "dbcSIM$fitted.values")

Next, we will create plots for each model.

unc_p <- ggplot(data = SIM_data,
                aes(x = uncTRIPS,
                    y = TRIPS)) +
  geom_point() +
  geom_smooth(method = lm)

orc_p <- ggplot(data = SIM_data,
                aes(x = orcTRIPS,
                    y = TRIPS)) +
  geom_point() +
  geom_smooth(method = lm)

dec_p <- ggplot(data = SIM_data,
                aes(x = decTRIPS,
                    y = TRIPS)) +
  geom_point() +
  geom_smooth(method = lm)

dbc_p <- ggplot(data = SIM_data,
                aes(x = dbcTRIPS,
                    y = TRIPS)) +
  geom_point() +
  geom_smooth(method = lm)

Now, we will put all the graphs into a single visual for better comparison by using the code chunk below.

ggarrange(unc_p, orc_p, dec_p, dbc_p,
          ncol = 2,
          nrow = 2)
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'